Google Analytics for Microsoft Silverlight is integrated into the Microsoft Silverlight Analytics Framework. With this framework you can easily track user activity within your Microsoft Silverlight content.
Feature Support
The Google Analytics for Microsoft Silverlight component bypasses the technical hurdles to tracking Silverlight content. With this component, tracking content is as simple as dragging, dropping, and defining category names for the reports. All the technical integration is done under the hood.
This integration support 3 main tracking capabilities of Google Anaytics:
Event Tracking
Event Tracking allows developers to track user interaction with content. See core Event Tracking Guide.
Within the Silverlight framework:
- The
Categoryfield corresponds to the Category field of theTrackActionbehavior. - The
Actionfield corresponds to theEventNameof the Trigger associated with theTrackActionbehavior. - The
Labelfield corresponds to the name of theTrackActionparent object. - The
Valuefield corresponds to the value field of theTrackActionbehavior.
Pageview Tracking
In standard JavaScript tracking, the default value of a page tracked by Google Analytics can be overwritten by passing a parameter to the
_trackPageview()
method. This allows you to overwrite the values displayed in the Top Content and Content Drilldown reports.
Within the Silverlight framework, pageview data is integrated within Silverlight Frames. When a frame loads, the name of the frame is sent as the URL and is logged as a "page" in Google Analytics.
Custom Variables
Google Analytics Custom Variables can be used to add additional information to Events and Pageviews. See Custom Variable Documentation.
When using Custom Variables in the Silverlight framework:
- Custom Properties added to framework specific behaviors will be mapped to the
Pagescope. - Custom Properties added to the Google Analytics object (added to the Layout Root) will be mapped to the
Sessionscope. - Custom Properties added to the
ABTestingobject provided by the framework will be mapped to theUserscope.