This project is read-only.
The player framework now offers a number of ways to support video analytics and telemetry in your app. There are two overall approaches you can take depending on your needs.
  1. DIY: The player framework includes numerous events and properties that you can easily wire up to in order to track and collect information about how your user is behaving when watching and interacting with the media. Please review the API documentation for details on all the possible APIs available to you.
  2. Tracking plugin: The player framework includes a simple yet valuable plugin to track playback positions and playtime milestones. This can be used, for example, to easily gather information about when the user has spent more than 30 minutes watching your video or when they reached the 75% point. Used in combination with #1 above, it can usually provide access to most of the analytic data you may wish to track. Click here to learn more about this plugin, tracking and markers.
  3. Analytics plugin: For more advanced scenarios, the player framework now includes a new analytics plugin to help collect and send quality and user behavior data to the web for analysis to help you troubleshoot your streams, understand the quality your users perceive and learn about usage patterns. This plugin builds on top of #1 and #2 above and offers an extensible architecture that 3rd party analytics services can easily expand on.
The rest of this document will focus on #3: The Analytics plugin

This analytics plugin is an optional plugin that can be hooked up to any backend such as Microsoft Audience Insight, Adobe SiteCatalyst (part of the Adobe Omniture suite), or any other service designed to help analyze your app's video usage.


Before we get started and take a look at how to add this to your project, it is important to understand the general architecture of the analytics plugin in the player framework so you understand the basics of how it works. The analytics engine of the player framework uses simple log objects to pass around information about what is occurring during playback. Here are some of the primary pieces of the analytics engine:



This is the primary class (built as a WinRT component) responsible for glueing together the data clients (the objects responsible for providing the information) and the logging service (the object responsible for broadcasting logs).


The analytics plugin collects data from four different types of data clients (each implementing a unique interface).
  • IEdgeServerMonitor: This dataclient is responsible for retrieving extra information about the server streaming your video such as the IP or domain name for your CDN. This will help you identify if a certain CDN is having problems.
  • IEnvironmentMonitor: This dataclient is responsible for providing system & environment information such as frames per second and CPU load. Note: this information is only available for Windows Phone.
  • IPlayerMonitor: This dataclient is responsible for relaying information about the state of the player. The Xaml and JS versions of the player framework each provide their own implementation.
  • IAdaptiveMonitor: This optional dataclient provides information specific to adaptive streaming and is not relevant when serving progressive download content. The player framework ships with an implementation specifically for smooth streaming but you could build your own if you are using a custom media foundation extension (or MediaStreamSource in WP8) such as HLS.


The logging service is a central (static) object responsible for broadcasting data to ILoggingTarget objects. These logging targets then consume the logs and process them.

Microsoft Audience Insight

The Audience Insight logging target is included out of the box with the player framework analytics plugin and is responsible for filtering, serializing, batching and uploading logs to an Audience Insight server. Find out more info about adding Audience Insight to your application.

Adobe SiteCatalyst

We have created a proof of concept logging target capable of logging to Adobe SiteCatalyst using the Site Catalyst SDK. We do not ship this with the player framework because it has a dependency on the Adobe SiteCatalyst SDK (which you need to download separately from Adobe). Find out more info about adding Site Catalyst to your application.

Custom logging target

Using the same technique as the Audience Insight and SiteCatalyst components, you can easily create one of your own to log data to a web service or monitor activity from within your app for diagnostic purposes. This could be a different analytics collection service in the cloud or it could be a part of your app used to diagnose problems. Find out more info about building and adding a custom logging target to your application.

Last edited Apr 23, 2013 at 12:08 AM by mdowney, version 16