I’ve been playing with the Framework and I tried to add a Google Analytics to a Siliverlight Navigation Application. Quite straightforward:
- Create a new Navigation application in VS
- Open MainPage.xaml in Blend
- Drop the GoogleAnalytics behahior in LayoutRoot and set Web Property ID
- Drop Track Action on ContentFrame
Works like a charm.
Now I would like to set some page scope custom variables. According to documentation:
“Page scope custom variables will correspond to the Custom Properties collection of the TrackAction associated with a specific object on the page (like a button).”
So I defined a custom property in Blend by clicking on “…” next to Custom Properties (Collection).
I ran the application, inspecting the requests with Fiddler, and noticed that the custom properties were missing.
Here is what the Get request looks like:
Here is my Xaml:
<mwad:PropertyValue PropertyName="MyVariable" Value="MyValue"/>
How do I get custom variables to work?