Radiant Media Player

Analytics Documentation



Last updated on January 4, 2017.

Introduction

Video related analytics are an important part of a successful online video strategy. It can tell you what content works better for your audience and provide guidance on how to increase number of views, viewer engagement and ultimately revenue.

Radiant Media Player provide several options for getting media-related analytics. All options work with HTML5 and Flash video.

  • Advanced Google Analytics integration
  • Analytics API
  • Heatmap analytics

Google Analytics

HTML5 Flash

Player settings

gaTrackingId: String

Google Analytics property ID. Typically looks like UA-XXXXXXXX-Y. Default: ''.

gaCategory: String

Set the Google analytics tracking category. Typically the object that was interacted with (e.g. 'Video'). Default: 'RMP Video'.

gaLabel: String

Set the Google analytics label for each events. Use it to uniquely identify your video (e.g. 'Fall Campaign').

Specific Google Analytics considerations

Our implementation is based on the analytics.js event tracking documentation. Refer to this documentation for more information. Events can be tracked in real-time or for "next-day" reporting in your Google Analytics back-end (events can be tracked in Behavior > Events).

Google Analytics imposes Limits and Quotas. As such the data collected by our Google Analytics implementation may only be partial. Our implementation takes this into account and is made to send only the required information to Google Analytics. If you have a high volume of monthly video views you may consider upgrading to a Google Analytics 360/premium account for better analytics data accuracy.

Each tracked media content should be sorted by gaLabel in order to see relevant data for a given content. Patterns between media content may vary.

The ready and startuptime events provide associated values in milliseconds. You need to look at average values for those 2 events.

Events are tracked for HTML5 and Flash playback with all supported streaming protocols for Radiant Media Player. However do note that some player set up (like extensive ad usage or the loop setting) may alter the data sent to Google Analytics.

Basic event tracking for Google Analytics

Below is the list of tracked events when a valid gaTrackingId setting is provided.

  • ready: the player has reached the ready state. The readytime value in milliseconds is also sent along this event. This event only fires once per player session.
  • playbackstarted: the player has started playback. When video ads are used this event fires when the content is started after all pre-roll ads are completed. This event only fires once per player session.
  • startuptime: the player startuptime in milliseconds is sent as an associated value to this event. Note that this event differs from the playbackstarted event when a linear pre-roll video ad is displayed as it is sent as soon as the first frame of the ad is shown.
  • playbackended: the player has reached the end of the content. This event may fire multiple times per player session. When loop setting is used this event may not fire.
  • playbackstartedafterhavingended: the player starts the content again after having reached its end. When loop setting is used this event may not fire. This event may fire multiple times per player session.
  • enterfullscreen: the player has entered fullscreen mode. This event may fire multiple times per player session.
  • seeking: the player has received a seek order. This event may fire multiple times per player session.
  • adstarted: the player has started an ad. This event may fire multiple times per player session.
  • adclick: the player has registered a click for an ad. This event may fire multiple times per player session.

The player will also send data about the context in which it is rendered. The related event will only fire once per player session.

  • html5-hls: the player is loaded in HTML5 mode with HLS.
  • html5-dash: the player is loaded in HTML5 mode with MPEG-DASH.
  • html5-mp4: the player is loaded in HTML5 mode with MP4 progressive download.
  • html5-webm: the player is loaded in HTML5 mode with WebM progressive download.
  • flash-hls: the player is loaded in Flash mode with HLS.
  • flash-mp4: the player is loaded in Flash mode with MP4 progressive download.
  • nosupport: the player displays a no-support message to the viewer because it has no valid playback option.

Advanced event tracking for Google Analytics: content mark analytics

Tacking content mark data for Google Analytics must be enabled with player setting. This option is only available for on-demand media content. This will cause the player to send more data to your Google Analytics account. Content mark analytics try to reproduce the heatmap analytics pattern describe below but within the constraints of what can be done within Google Analytics. It should help you to tell which type of content works better for your audience and what part of this content is consumed.

content mark analytics are based on estimates and statistics pattern. They can provide an indication as to how your media content is consumed but may not be an exact representation of the real behavior of your audience.

gaAdvanced: Boolean

Enables tracking of content mark data for Google Analytics. Default: false.

The following events are sent to Google Analytics when a specific % mark of the content has been reached. A given content mark event can be sent multiple times within a player session assuming the same mark of the content is reached multiple times.

  • contentmark: 10%
  • contentmark: 20%
  • contentmark: 30%
  • contentmark: 40%
  • contentmark: 50%
  • contentmark: 60%
  • contentmark: 70%
  • contentmark: 80%
  • contentmark: 90%

Analytics API (player API)

HTML5 Flash

Analytics data are delivered with JavaScript for both HTML5 and Flash video. See our player API documentation for a better understanding on how to use the player API.


General methods

getTimeViewed
rmp.getTimeViewed()

This methods returns a Number expressed in milliseconds that represents the cumulative time viewed for the current player instance. Returns -1 if not available. This number can exceed content duration if the same content part is viewed multiple times for a single player instance.

getPercentViewed
rmp.getPercentViewed()

This methods returns a Number expressed in milliseconds that represents the cumulative percent viewed for the current player instance (example 20 for 20%). This is calculated versus the content duration. It will only return valid for on-demand content as for live the content the duration is unknown. Returns -1 if not available. This number can exceed 100% if the same content part is viewed multiple times for a single player instance.

getTimeReady
rmp.getTimeReady()

This methods returns a Number expressed in milliseconds that represents the time for the player to be ready (i.e. fully appended to DOM and ready to receive API calls). Returns -1 if not available.
This setting has been added with player version 2.7.5

getStartUpTime
rmp.getStartUpTime()

This methods returns a Number expressed in milliseconds that represents the time needed for the player to display the first frame of the video/audio after the initial viewer interaction (or autoplay). Returns -1 if not available. This method will return a proper value after the startuptimeavailable player event fires.
This setting has been added with player version 3.2.0


Heatmap analytics

HTML5 Flash
This feature has been added with player version 3.2.0

A heatmap represents the parts of a media content being consumed by your audience. Typically in the case of soccer when a goal happens viewers will replay some reduced sections of the content multiple times indicating a clear area of interest. Better than words an image:

heatmap representation

The idea here is to provide API player methods in order to reconstruct a heatmap for a given media content. This works for HTML5 and Flash video. This is only available for on-demand video. Live and DVR content have fluctuant duration and thus a heatmap cannot be drawn.

The heatmap analytics API is a client-side API. In order to get to a complete solution you will need to send the information provided by the player to a remote logging server where the heatmap analytics data can be stored and processed. This last part is for you to set up.

getRawHeatMap
rmp.getRawHeatMap()

This methods returns an Array. The array size is dictated by the heatMapAccuracy player setting (see below). Each item of the array consists of an incremental number of player ticks. A player tick is registered each time the timeupdate event fires.
Typically after a certain amount of time playing a video the getRawHeatMap method may return something like:
[18, 19, 18, 19, 81, 84, 45, 36, 17, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

This is the output for the heatMapAccuracy default value of 20. This means that ticks are logged within segments that represent 5% of the content. So the first array item 18, means that when the getRawHeatMap method was called 18 ticks have been registered for the first 5% of the content. At index 4 of the array we can see an increase in ticks, 81 then at index 5, 84 ticks. This means that this area of the video has been watched more intensively by the viewer while the second half of the video was ignored.
This will effectively tell you what parts of a content work and what parts are skipped by your audience.
In order to draw a clear picture you will need to query the getRawHeatMap method at regular intervals and to send those data to a logging server for post-processing.

getPercentHeatMap
rmp.getPercentHeatMap()

This methods returns an Array. The array size is dictated by the heatMapAccuracy player setting (see below). Each item of the array consists of a % representation of the % of time actually spent by a viewer on different sections of the video. This is a convenience wrapper for the getRawHeatMap method.
Example of returned value for getPercentHeatMap after some amount of time playing a video.
[5.6, 5.6, 5.6, 5.6, 29.8, 28.9, 8.5, 5.6, 4.9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

This is the output for the heatMapAccuracy default value of 20. In the above example we can see that the viewer spent more than 50% of his/her time viewing the content within the same 10% slice of content (the 20-30% section) while not having watched the second half of the content at all.
This will effectively tell you what parts of a content work and what parts are skipped by your audience.
In order to draw a clear picture you will need to query the getPercentHeatMap method at regular intervals and to send those data to a logging server for post-processing.

heatMapAccuracy
heatMapAccuracy: 20

This is a player setting. The value must be a Number. The default 20 value means that the content will be cut into 20 segments. Each segment represent 5% of the content duration. Ticks are logged for each of those 5% segments.
You can increase accuracy up to 100. With a 100 value the player ticks will be logged within segments that represent 1% of the content duration.

You are most likely going to have to play around with the above methods/player setting in order to grab the full scope of the heatmap concept and how powerful it can be in order to achieve a successful online video strategy.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.