Add services in App not working

May 17, 2010 at 5:47 PM

Did i misunderstand the Getting started -> Adding Analytics Tracking to a Silverlight Application help.

                <ga:GoogleAnalytics WebPropertyId="UA-****-1"/>

I understand that this should work: but it is not working. I must also add it in MainPage (where frame control is)

			<ga:GoogleAnalytics WebPropertyId="UA-****-1"/>

I though that i can set only in App.xaml and the it will be visible everywhere.

My MainPage.xaml

<sdk:Frame x:Name="frame" UriMapper="{StaticResource urimapperMain}" Source="/Domov" BorderThickness="0" >
						<i:EventTrigger EventName="Navigated">


May 17, 2010 at 5:57 PM

Maybe because i am getting silent error in browser:

Unhandled Error in Silverlight Application Object reference not set to an instance of an object. at System.Windows.Interactivity.Interaction.GetBehaviors(DependencyObject obj) at Microsoft.WebAnalytics.WebAnalyticsService.AttachServices(DependencyObject layoutRoot) at Microsoft.WebAnalytics.WebAnalyticsService.AttachServices() at Microsoft.WebAnalytics.WebAnalyticsService.Started() at System.Windows.Application.Application_Started(Object sender, EventArgs e)

The error is causing:
<ga:GoogleAnalytics WebPropertyId="UA-****-2"/>
this line. If i remove it, there is no error.

What to do now?