Google Analytics Tracking for Microsoft Silverlight

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 Category field corresponds to the Category field of the TrackAction behavior.
  • The Action field corresponds to the EventName of the Trigger associated with the TrackAction behavior.
  • The Label field corresponds to the name of the TrackAction parent object.
  • The Value field corresponds to the value field of the TrackAction behavior.

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 Page scope.
  • Custom Properties added to the Google Analytics object (added to the Layout Root) will be mapped to the Session scope.
  • Custom Properties added to the ABTesting object provided by the framework will be mapped to the User scope.