This blog post will show you how to integrate the Bitmovin Adaptive Streaming Player with Google Analytics.
For most commercial websites, Google Analytics is a must have. It is easy to install, and provides great insights into page views, traffic sources, user behaviour, user technology, goal conversions and much, much more. But when it comes to video, it is not very effective. User activity inside the video player is not reported, which leaves a significant blind spot for video publishers.
It’s all About Metrics
The argument for using analytics for video is essentially the same as analytics for any other online vertical: By better understanding how your customers are using your website or app, you can optimize their experience and /or modify their behaviour, usually with the end goal of maximizing your revenue. In the case of video, to gain an understanding of how and why a visitor reacts in a particular way to your video, you will need insight into how your users are interacting with your video player.
What can you Track?
As with all of our products, the Bitmovin Player is build for developers, and so it is quite straightforward to set up tracking events. Here are 5 examples of common events that will occur regularly in most online video scenarios, that are will deliver valuable data.
The ON_PLAY event fires every time someone clicks the play button. This is obviously an easy way to track how many people watch a particular video, but it can also be used in combination with other metrics to gain a deeper understanding of the user experience.
For example, you might find that a page with a video has thousands of page views, but very few ON_PLAY events. This might suggest that the video does not look interesting enough. If this is happening you might consider replacing the poster image.
Conversely the player’s ON_PLAY event might seem to be happening too often. Perhaps your video is frequently buffering, causing frustrated viewers to hit STOP then PLAY repeatedly, in an attempt to view the content.
A metric to show you how many times a video is paused might be useful to measure engagement in the case of presentation, where users might be pausing the video to read the notes. Or it might be a sign that the video is not maintaining the viewers attention, and users are pausing as they search for other content. By combining the PLAY and PAUSE metrics, you could quickly find out which of the two possibilities is the reality.
ON_PLAYBACK_FINISHED is a very useful metric. This can show you how many times a video was played through the the end. In combination with ON_PLAY you can quickly get an idea of how engaging a particular piece of content is.
Engagement with advertisements is obviously of huge importance to many content providers, and the ON_AD_CLICKED event will provide great insights into that. This is not only useful for reporting on the success of any particular ad, but can also be used to optimize and align ad content with video content.
In some cases you may find that the quality of a video is affecting the engagement, and a high frequency of quality changes might signal that there is a problem. ON_VIDEO_PLAYBACK_QUALITY_CHANGED will fire a trackable event every time that a user manually, or the player automatically changes the quality of the video.
The options listed above are just a few of the potential events that you can set up with google Analytics. The Bitmovin Player allows you to track almost every possible interaction that a user might have, as well as things that might be bi-products of a “user action” such as errors. You can find a full list of events under the events menu in our video player API documentation.
Advanced Analytics Options
While Google Analytics provides a very powerful set of analytics features, it is not designed specifically as a video analytics platform, and therefore will not deliver the type of information required for a comprehensive video analytics solution.
Part of the difference between regular web analytics and video analytics is the dimension of time and how it relates to the events that occur in your player. A good example of this is buffering. By combining the events ON_STALL_STARTED and ON_STALL_ENDED in a more advanced video analytics platform, you can start to build a picture of how often your videos are buffering, and for how long. With that information you can optimize your encoding profiles, or even implement more advanced adaptation techniques, such as Per-Scene Adaptation, to better serve your audience and improve the user experience across all your video offerings.
To address the advanced needs for Analytics tools in the online video domain, Bitmovin has developed a dedicated analytics product. The Bitmovin Analytics solution is an advanced, developer focussed tool that allows the collection, combination and presentation of data to be completely customized to suit your business needs. Some of the other advantages include:
- Monitor load times, buffering, adaptation behavior
- Easily investigate how users are watching your content
- REST-API to query your raw data and combine it with data from other sources
- Analyze individual sessions for debugging
- Designed for adaptive streaming (HLS and MPEG-DASH)
- A/B testing support
- Create webhooks and notifications
- Custom fields and dimensions for filters
- Integrates easily into existing workflows
You can request a free demonstration of Bitmovin Analytics by contacting our solutions team.
Setting up Google Analytics
The first step to integrating Google Analytics with the Bitmovin player is to create your Google Analytics (GA) account by navigating to https://analytics.google.com This is a simple process and you can use your existing Google/Gmail account.
After you have created your GA account, you’ll want to locate your analytics ID, e.g. UA-XXXXXXXX-X, and make note of it as the Bitmovin Player will use this ID when sending data to your GA account.
The next step is to add the Google Analytics tracking code to the header of your website. That will allow Google to start tracking user activity on your site. Simply copy the code below, replacing the UA-XXXXXXXX-X with your unique tracking code and paste this code snippet inside the HEAD tag of your website, or just before the