JW Player Video Measurement
JW Player is a popular video platform that offers solutions for publishing and distribution of digital media. If you are a JW Player customer and an Adobe Analytics customer, bringing video playback data into your site and app analytics is critical to seeing a complete picture of your content consumption and monetization. http://www.jwplayer.com/
In order to implement video analytics for your JW Player you will need the following items:
Ability to add code to your site: In addition to analytics changes, you will also need to modify the video player code.
A current analytics code version: The solution requires H code version H24 or higher or appMeasurement.
I am not going to cover the measurement plan here, but I strongly encourage you to map out what aspects of video playback you need to capture and select the Analytics variables you will use before you start modifying your code. A measurement plan will help with implementation and provide documentation into the future.
After designing a measurement plan, modify the analytics code (appMeasurement or s_code) to include the Media Module. Be sure that you add the Media Module that corresponds to the code version currently in use. If you are updating your analytics code, the Media Module is included in the downloads available within the Code Manager section within Reports & Analytics. (You can see an example of the Media Module in this appMeasurement.js file for the sample player.)
There are two steps to the JW Player player mapping: calling the video player correctly on your page, and adding the JW Player player mapping code to your analytics file.
Edit the page level code used to call the JW Player video player to include the trackMilestones function. This function acts as an indicator that the video player has loaded. Depending on the instantiation method used on your site, you may need to slightly modify this behavior.
Next, add the JW Player player mapping to your analytics code file within the plug-ins area. The code maps the JW Player events to the Analytics Media Module methods. The code can be grabbed from the sample player’s appMeasurement file.
The trackMilestones function wraps the player mapping. This would be line to change to modify the player ready indictor. The player name is a required variable but can be modified to match your desired formatting and value. The JW Player player mapping includes the basic hooks and methods for capturing video advertising playback. This code can be removed or modified as required by your measurement plan. See more of the JW Player API options.
With the player mapping code in place, the Media Module functions will fire when specific player events occur. The final implementation step is to add the video variable mapping to your analytics file. Follow your measurement plan for the proper frequency and variable usage. In the sample player I am setting quartiles.
A few things to note about this sample code:
Enable Video Tracking: I recommend wrapping the variable mapping in a true/false variable. In this example I am using s.enableVideoTracking. This allows a developer to easily turn on and off the video tracking and also contains the variable mapping within one function.
Track Vars: Make sure to include all the variables and events in the s.Media.trackVars and s.Media.trackEvents variables or the variables may not show up in your tracking calls.
Auto Track: s.Media.autoTrack is set to false because we added player specific event listeners in the player mapping code.
After completing implementation, load your files into a browser and use a packet sniffer to check the tracking calls. You should see a group of a.media context data variables. All the context variables can be mapped to Analytics variables by using the processing rules within SiteCatalyst.