Out of browser not working with Google Analytics

Sep 27, 2010 at 3:06 AM

Hi,

Thanks for the great framework (it replaced my .js/html page solution!) - however, I can't get actions tracked in my out of browser, SL4 app.

I run fiddler and can see the hits being logged on the live site, however, my OOB actions never show up in fiddler or the GA results.

As per the .chm file, I have added   

 <Application.ApplicationLifetimeObjects><mwa:WebAnalyticsService/></Application.ApplicationLifetimeObjects>

to my app.xaml and have various tracking actions (code and xaml). As I mentioned, the actions are definitely being tracked correctly in GA, just not when OOB.

Where is the data stored when running oob (I am connected 24/7) or is it stored locally anyway and then sent up periodically?

How can I test it or get it working?

Thanks

Coordinator
Sep 27, 2010 at 5:07 AM
Edited Sep 27, 2010 at 5:25 AM

Is your problem with OOB offline or online or both?

Is it happening when you are debugging via http://localhost and with your live site?

If you are connected, then the data should be sent directly when the events are hit.

Do you have a site URL that you can point me to so I can see?  You can send me a private message if you like.

Is your GoogleAnalytics behavior on your page or in your app.xaml?

If you want to access resources out of your current domain, you will need your OOB app to require elevated permissions.

You can do a simple test by putting an image with an external URL in your app - in an OOB app, it will not show up without elevated permissions.

Also, Silverlight OOB traffic does not show up in Fiddler.

Michael

Sep 27, 2010 at 5:44 AM

Hello Michael,

Thanks for the quick reply.

The link is the one in my first post - you can install it OOB.

The problem is happening in OOB. Online works fine.

I have changed the datetime on GA to today and can see all the online actions, however, when I run my browser OOB they are not being tracked (ie. no OOB tracking actions are showing up).

My app is signed and requires elevated trust.

Sep 27, 2010 at 6:01 AM

It does seem be storing the data correctly in isolated storage - I have a file called Microsoft.Silverlight.Analytics.Framework.WebAnalyticsData.txt and it is recording the actions (even though I am connected).

For example, when my OOB app downloads a new version, it logs this event (and this is in the live data below) - 

UpgradedToNewVersion
but this is not showing up as an action in GA.

It does not seem to be making the call to the GA service (I set it to todays date but there actions

<AES xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/webanalytics/2010"><E><AE><AN>PokerDIY Tourney Manager</AN><ARG xmlns:d4p1="http://microsoft.com/Analytics/2009" /><AV>PTM</AV><HT>Event</HT><IS>Installed</IS><L>en</L><N>PTMLoadedOOB</N><NS></NS><OT>ApplicationAnalytics</OT><RS xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.Windows"><d4p1:Height>600</d4p1:Height><d4p1:Width>800</d4p1:Width></RS><SV>4.0</SV><TC>PT0.171875S</TC><TS xmlns:d4p1="http://schemas.datacontract.org/2004/07/System"><d4p1:DateTime>2010-09-27T05:56:25.34375Z</d4p1:DateTime><d4p1:OffsetMinutes>600</d4p1:OffsetMinutes></TS><UA>Silverlight</UA><VER>0.7.3922.29599</VER><ZF>1</ZF></AE><AE><AN>PokerDIY Tourney Manager</AN><ARG xmlns:d4p1="http://microsoft.com/Analytics/2009" /><HT>Event</HT><IS>Installed</IS><L>en</L><N>Starting</N><NS></NS><OT>WebAnalyticsService</OT><RS xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.Windows"><d4p1:Height>600</d4p1:Height><d4p1:Width>800</d4p1:Width></RS><SV>4.0</SV><TC>PT0.296875S</TC><TS xmlns:d4p1="http://schemas.datacontract.org/2004/07/System"><d4p1:DateTime>2010-09-27T05:56:25.46875Z</d4p1:DateTime><d4p1:OffsetMinutes>600</d4p1:OffsetMinutes></TS><UA>Silverlight</UA><VER>0.7.3922.29599</VER><ZF>1</ZF></AE><AE><AN>PokerDIY Tourney Manager</AN><ARG xmlns:d4p1="http://microsoft.com/Analytics/2009" /><AV>PTM</AV><HT>Event</HT><IS>Installed</IS><L>en</L><N>UpgradedToNewVersion</N><NS></NS><OT>ApplicationAnalytics</OT><RS xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.Windows"><d4p1:Height>600</d4p1:Height><d4p1:Width>800</d4p1:Width></RS><SV>4.0</SV><TC>PT0.453125S</TC><TS xmlns:d4p1="http://schemas.datacontract.org/2004/07/System"><d4p1:DateTime>2010-09-27T05:56:25.625Z</d4p1:DateTime><d4p1:OffsetMinutes>600</d4p1:OffsetMinutes></TS><UA>Silverlight</UA><VER>0.7.3922.29599</VER><ZF>1</ZF></AE></E></AES>

Coordinator
Sep 27, 2010 at 6:19 AM

I just figured out the problem - it is a bug in Microsoft.WebAnalytics DataCollector.cs and I am working on checking in a fix right now.

http://msaf.codeplex.com/workitem/14099

Sep 27, 2010 at 9:04 AM

Thanks, let me know when it's ready and I can test it...

Coordinator
Oct 10, 2010 at 3:22 PM

This should be fixed now in release 1.4.7.