1. Creatable Support
  2. Guide for Developers

Analytics tracking for video players & embeddable widgets

The purpose of this document is to describe how to set up analytics tracking for video players & embeddable widgets using Creatable analytics or any 3rd party analytics system such as Adobe Analytics or Google Analytics. By default, all experiences that are provided by us have Creatable analytics enabled, tested and working out of the box. We provide methods to integrate 3rd party analytics for the various events that are fired by our experiences.

For integration with a 3rd party analytics system, you can skip to the section “Integration with 3rd Party Analytics”.

Initializing the analytics library

Along with your player implementation, to enable data gathering you need to initialize our analytics library. Once initialized, the analytics library will be able to accept event data triggered by your player.

Please note where it says “XXXXXXX”, this needs to be replaced with your account id, otherwise the tracking pixel will not work properly. Please contact your client success account manager if you do not have your account id.

Untitled-2

Upon successful initialization of the analytics client library there will be a couple of requests made to establish a viewing session. You can see these requests in the dev tools section of your web browser. The requests are made to:

__tvpa.gif

The requests will contain the following parameters (in addition to others, but these are the important ones to note):

rt=cid

rt=hb

These 2 requests ensure that a viewing session is created and being tracked. You should expect the cid request to have an HTTP response code of 200 and the hb request to have an HTTP response code of 201.

Sending analytics events

Once data gathering is enabled, we can configure the various events that need to be fired for data gathering. These include:

  • Start of video playback
  • Quartiles (25, 50, 75, 100)
  • View time

A best practice for sending these analytics events would be to create a timer loop that executes every 1 second during playback and fires the events appropriately. For example, upon start of playback, the timer loop would immediately fire the start of video playback events. During playback, it would check every 1 second if it needs to fire the quartile or view time events. When playback is paused/stopped, the timer should also pause/stop.

Start of video playback: The start of video playback is simply the start of playback for a given video. This typically happens once for a single video, a user starts playback, the video plays, it could be paused, the user could use the scrubber to watch the video from a specific point in time and the video could end. If the video has ended and the user starts playback again, then another start event should be fired.

Trigger this code upon the start of video playback:

Screen Shot 2024-04-08 at 2.54.58 PM

Quartiles: During playback, as the user watches the video, when the video reaches certain percentages of the video watched, quartile events need to be fired. A quartile event represents a specific percentage of the video has been watched

Screen Shot 2024-04-08 at 2.55.28 PM

View time: The view time event is considered to be a “heartbeat” of sorts, indicating that a viewer has watched a segment of video. The view time event should be fired every time 3 seconds of video has been watched.

Screen Shot 2024-04-08 at 2.56.25 PM

[video_id][elapsed time since playback started in seconds][generated uuid][the point of playback in seconds][length of the video in seconds]

Validating analytics events

Once you have completed your analytics event triggers for data gathering, validating these events is simple. Each of the requests made contain an “rt=” parameter (the same parameter we discussed above in the initialization section). If everything is set up correctly, during playback, you should observe the following events being fired:

rt=vv: Upon start of playback.

rt=vtp: A quartile event after a specific percentage of video has been watched (25%, 50%, 75%, 100%).

rt=vt: After a 3 second segment of video has been watched.

Integration with 3rd Party Analytics

If you wish to capture event data using a 3rd party analytics system, this can be done by binding your custom event listeners to elements of a widget for example, or by listening to the events that are emitted by the widget. The same concept applies for a media hub as well. In both cases, your analytics library is loaded on the page (where the widget is embedded, or a page on a media hub) and a custom script is executed to fire analytics event data using the methods specified by your analytics team. Below is a list of Creatable events that you can integrate with your 3rd party analytics system:

  1. Video view
  2. Photo view
  3. Product click
  4. Storefront view

For video playback specific events, you can track:

  1. Start of video playback
  2. Quartiles (25, 50, 75, 100)
  3. View time (in 3 second increments)

For tracking inbound link clicks, you can utilize our custom link tracking functionality to configure inbound links with the proper UTM tracking values.

As always, you can contact your client success account manager (support@creatable.io) for assistance with setting up custom 3rd party analytics tracking.