How do I set up Google analytics for a WPF app

Jul 29, 2010 at 8:33 AM
Edited Jul 29, 2010 at 8:34 AM
I stumbled across msaf a couple of days ago and have been able to set up Google Analytics(GA) to track events inside a silverlight application. I wanted to do the same for a WPF application. I was able to create a WPF project with GA in Blend. But how do I get GA to track it? For the WPF app, I went ahead and created a GA account, but when asked for a URL, gave a dummy URL. Doing this ensured that I got a unique tracking code that I could use in my WPF application. This however doesn't work. It has been 24 hours and GA is still shows "Tracking Unknown". Obviously I am doing something wrong here. Any clue as to what is amiss? Thanks!
Jul 30, 2010 at 12:19 PM
Edited Jul 30, 2010 at 12:34 PM

So I went ahead and ran the WPF demo that is there in the source code. I don't see anything different from what I am doing but for the absence of GA tracking. Also even in the WPF demo project, where do I see whether the event tracking calls are being made? The output window in Visual studio 2010 doesn't show me anything, when the project is run in debug mode.

Can we even track events in a WPF application using msaf?

Jul 31, 2010 at 9:37 AM

Hello there,

We have a non-MSAF solution for WPF/Google Analytics and we're working on an alternative to Google's MSAF service. Some info can be found at

Let me know if you would like to give it a try,


---bjorn - WARG - Web Analyses for Decision Makers

Aug 2, 2010 at 1:23 PM

Thanks for your suggestion. But I am right now looking at an MSAF solution and would like that to work for me.

Aug 2, 2010 at 1:30 PM

Downloading the source code and building Microsoft.WebAnalytics.Behaviors.WPF dll in debug mode, I could track the events of my WPF app on the Visual Studio output window using ConsoleAnalytics. But the initial question still stands, how do I get it to work using GA?