How to Setup Google Analytics for Video Success

< Back
At Wicket Labs, we love data. Obviously! But…we need access to the highest quality data to ensure that your video service is a success. These data sources can come from many different integrations; online video platforms, subscriber management systems, e-commerce platforms, website and app analytics platforms, etc.

A large number of websites use Google Analytics for their site tracking data. Google has been tight-lipped about just how many use the platform, stating in 2012 (a very long time ago in internet years) that over 10 million sites were using it. Some estimates for usage come in at a whopping 52.9% of all websites.

Google Analytics is a powerful tool for measuring how users engage with your site. Some features that are useful for video services, however, are not enabled by default and require additional setup. Once activated, these features will enhance your data and ultimately make Google Analytics a more useful data source for an audience insights platform like the Wicket Scorecard.

Below are three adjustments we suggest to the default setup to help video services get the most out of their data.


We’ll start at the user level. By default, Google Analytics tracks each user’s activity using an anonymous, randomly generated session ID. This ID is not tied to a subscriber database and does not persist across sessions, making it impossible to tie activity to a specific subscriber and trace their activity across sessions and devices.

Fortunately, there’s a solution: Google’s User-ID feature. This feature allows you to send your own subscriber ID to Google via their tracking code.

To get started with User-ID, the feature must be enabled in the admin section of your Google Analytics account:

Google Analytics settings to enable User ID feature

Fig. 1 – Google Analytics property settings to activate User-ID feature.

It’s important to read Google’s User-ID policy closely, as Google has strict policies against storing PII. Google explains what’s acceptable here:

Generally speaking, you should use a numeric or alphanumeric ID. You should not use a person’s name or email address. For added security, consider hashing the ID with a cryptographic algorithm such as SHA256 before submitting to Google.

Another important consideration is that Google does not allow their native User-ID field to be queried via their reporting API. It is therefore strongly recommended that you duplicate the user id value in a custom dimension, which can be queried. This gives you the ability to quickly search for all activity by a specific person.

Instructions to set-up a custom dimension are available in Google’s documentation. You will want to set Name to “user_id, Scope to “Hit”, and Active to “true.”

Finally, you will need to update your website and/or apps to submit the user id to both the User-ID field and user_id custom dimension. Here is a basic code example:

ga('create', 'UA-XXXX-Y', 'auto');

// Set user id for signed in user
ga('set', 'userId', {{USER_ID}});

// Set user id for custom dimension at index 1.
ga('set', 'cd1', {{USER_ID}});

// Send a pageview to Google Analytics
ga('send', 'pageview', location.pathname);

In certain circumstances, Google Analytics will not return data for an event if its custom dimensions are blank. To resolve this, if you are not setting a value for a custom dimension, you should submit the word “null” instead.

By tracking subscriber activity across sessions and devices, you can see a more complete picture of how subscribers use your service, including the content that interests them.

Video Events

Many streaming video services use an Online Video Platform (OVP) to manage their content. OVPs will often include video statistics, but typically at an aggregated view. While it’s useful to know how many times each video was watched, what if you wanted to know who watched each video? This information could help you tailor your service to each user. If you aren’t already tracking this information now, one option is to use Google Analytics.

Although Google Analytics does not track video events out of the box, they can be modeled using custom events. Video players will need to be programmed to send custom events to Google whenever certain video actions occur. Your actions might be different based on the feature set of your video player or your personal requirements, however, we recommend the following:

Event Label should be set to the title of the video. Note that the label is limited to 500 bytes, so the title may need to be truncated. The Event Category for all events should be set to “player”. Do not set an Event Value.

Implementation of event tracking can be configured using something similar to the following:

ga('send', 'event', [eventCategory], [eventAction], [eventLabel], [eventValue], [fieldsObject]);

Google describes how this works in more detail here:

When your video player sends these events to Google Analytics, you will also need to set two custom dimensions. First, create the new dimensions;

  • Name: “video_id”, Scope: “Hit”, Active: “true”
  • Name: “video_position”, Scope: “Hit”, Active: “true”

For all video player events, you should set “video_id” to the content id from your Video Management System.

For the progress, pause and stop video player events, you should set “video_position” to the user’s current playback position in seconds. For example, if the video is two minutes long and the user pauses exactly at the halfway point, “video_position” would be set to 60.

In certain circumstances, Google Analytics will not return data for an event if its custom dimensions are blank. To resolve this, if you are not setting a value for a custom dimension, you should submit the word “null” instead. This will be the case with “video_position” on some video playback events.

All of this information enables us to see how users are engaged with your content across dimensions, such as: tracking new user viewing activity, short and long tail statistics on series and episodes, completion rates, relationships between content and churn, etc.

Channel Groupings

While the default channel groupings may work well for most Google Analytics applications, creating custom groupings can provide you with another powerful way to classify how traffic arrives to your site and in turn, converts to a trialist or subscriber.

For example, say you have a network of websites that send traffic to your video service. Rather than having these be grouped under the default Referral channel, you can set up a custom channel grouping so Google Analytics knows to group them together. This can be done through the Channel Groupings dropdown by navigating to Conversions > Multi-Channel Funnels > Top Conversion Paths (Fig. 2)

Create custom channel grouping in Google Analytics

Fig. 2 – Google Analytics property settings to activate User ID feature.

It can also be found in Admin > View > Channel Settings (Fig. 3)

Custom Channel settings in Google Analytics

Fig. 3 – You can change Channel settings in the Google Analytics Admin View settings.

Once this is set up, you can choose to show your channel grouping from the same drop-down on the Top Conversion Paths tab or on Assisted Conversions. Data quality matters. With just a little bit of work up front, you can prepare Google Analytics to work more effectively for your video service. It will pay off as you review the unique insights focused on your audience, the content they watch, and better engagement with your service. Don’t miss out on these easy opportunities to add powerful features to your data set.

To learn more about how Wicket Labs can help set your video service up for success, contact us for a demo of the Wicket Scorecard and see how we’re leveling the playing field and increasing audience lifetime value for our customers.