MSAF - Google Analytics for WPF. Search for working demo

Dec 6, 2011 at 9:35 AM

Hello! I am currently using MSAF to track user activity in Windows Phone 7 projects and i really like it. Now i want to do the same in my WPF applications. Unfortunately i could not find ANY working demo project across the Internet. I tried do use drag'n'drop method in Expression Blend 4, but when i run my project it throws an Exception. I am becomming this exception on adding Google analytics behavior to Interaction.Behaviors (VisitorID property not found). Could somebody write a small tutorial how to get it working? Thanks!

Here is my XAML:

<Window x:Class="WpfApplication1.MainWindow"
        Title="MainWindow" Height="350" Width="525"
    <Grid x:Name="LayoutRoot">
				<ga:GoogleAnalytics WebPropertyId="UA-123456-78" SessionLength="30" />
		<Button Content="Button" Height="23" HorizontalAlignment="Left" Margin="25,12,0,0" Name="button1" VerticalAlignment="Top" Width="75" >
				<i:EventTrigger EventName="Click">


Jan 15, 2012 at 11:59 PM

Hi apic, did you find a solution? I'm considering this too.


Jan 16, 2012 at 7:15 PM

Hi dadvir, unfortunately i didn't find the solution yet. It seems, that the WPF Version of analytics framework was compiled with wrong settings (or setting names). Anyway, i desided to use GaDotNet library (can be found on Codeplex). It is simple and powerful library which can track not only events, but pageviews and transactions too (very useful to track in realtime). The only disadvantage of this project is that you have no drag_'n' drop visual elements in it. That meens that you must implement tracking in code. But it is very simple. Try it out if you have no time to wait for an update... 

May 10, 2012 at 1:16 PM

I guess I'll look at Ga.Net (now on github). Thanks for the advice. I wish they would have actually written a demo app using the behaviors. Disappointing.

Jan 5, 2016 at 7:05 AM