Log in to your account
Sign up

How To Track Video Views With Google Analytics

29 November 2017 | 0 comments | Posted by Che Kohler in nichemarket Advice

How to track video with Google Analytics

If you're making use of video marketing, you'll soon realise that YouTube stats just don't tell the full story especially when it comes to embedded video. Having embedded video on your site is meant to improve your sites user experience, but that experience comes at a price.

Running video on your site, you have two options, self-hosted or via 3rd party services like Youtube, Vimeo, Daily Motion or Wistia. Regardless of your chosen video will slow down page load speed and cost you money to produce and promote so tracking as many performance metrics are essential if you want to know how to improve your video marketing efforts or want to see if it is a worthwhile exercise.

For more on video marketing check out our post - The Importance of Video For Brand Marketing

Event tracking

To track video using GA we will use the Event Tracking feature to capture specific data points. By making a few changes to your tracking code, Google Analytics will be able to capture actions that happen within pages, like clicks on downloads, or AJAX elements that bring in new content without a reload, or — in this case — plays of videos embedded in the page. Basically, anywhere someone clicks or otherwise interacts with the site, we can track. Event tracking has the following labelling options, and you can use them however you like.

  • Category (required): high-level groupings of the different kinds of events on our site
  • Action (required): within the category, what did the visitor actually do
  • Label (optional): further differentiate what happened
  • Value (optional): a numerical value that pertains to the event (no pre-assigned meaning, could be dollars or seconds or points or whatever)

In case you feel like you need a standard format to work off of, feel free to use the following setup:

  • Category: Video
  • Action: Play, Pause, Stop, Finished
  • Label: The title or filename of the video (assuming you have more than one video on your site)

Classic analytics method

If you're running classic analytics, you will need to have your developer tag on-click actions with the following script

hitType: 'event',
eventCategory: 'Videos',
eventAction: 'play',
eventLabel: 'Fall Campaign'

Note: If You're running Wista embeded video you will need to upgrade to either unviersal or GTM run GA universal.

Universal analytics method

If you're running universal analytics, you will need to have your developer tag on-click actions with the following script

ga('send', {
hitType: 'event',
eventCategory: 'Videos',
eventAction: 'play',
eventLabel: 'Fall Campaign'

Note: If you do not want this to affect bounce rate add the following line nonInteraction: true
Note: If You're running Wista embedded video no need to add additional tracking it should already be pushing events to your GA account.

Google Tag Manager method

There are quite a few custom methods online, and most of them are super complicated, thankfully Google does listen to its community and has now built in video tracking into the platform so no need to download additional files or create a flurry of custom variables that need to talk to one another. If you're running GTM you will need to follow these steps:

Creating your variables:

  • Firstly open GTM and head down to the variables section and click configure
  • Then scroll down to the videos section and select all the video variables you may want to use, I just select all of them
  • Now scroll down to user-defined variables and create a new variable
  • Select custom javascript variable and paste the code below

function() {
var status = {{Video Status}};
switch (status) {
case 'start':
return 'Start playing';
case 'pause':
return 'Pause';
case 'buffering':
return 'Buffering';
case 'progress':
return 'Reached ' + {{Video Percent}} + '%';
case 'complete':
return 'Reached the end';

Creating your tag:

  • Now head down to tags and click new
  • Give your tag a name - IE Video tracking tag
  • Select universal analytics tag type
  • Add your GA account ID
  • Set track type to Event
  • Set the category to - Youtube
  • Set the action to - the custom javascript variable you created earlier
  • Set label to {{Video Title}} - {{Video URL}} to capture the name and where the video was played
  • Set non-interaction hit to false if you don't want it to affect bounce rate

Creating your trigger

  • Now head down to triggers
  • Give your tag a name - IE Video tracking tag
  • Select trigger type Youtube video
  • Select all variables - Start, complete, pause, seeking, buffering and progress
  • Add the %s you would like to track. I use 25,50,75
  • Select add JavaScript API support to all Youtube videos
  • Set the trigger to fire on all videos
Note: If you're running Wista embedded video and GTM GA integration then there no need to add additional tracking it should already be pushing events to your GA account.

Track your video quality not just reach

While it does take a bit of technical, know how to implement, and it is nowhere near a comprehensive solution for tracking your video marketing it does give you a nice overview of how users interact with your video. This method also helps you consolidate your data into one tracking tool, and you can see which traffic channels play well with video and which do not. So go ahead and pick the method you prefer and get started with tracking your video with Google analytics.

Contact us

If you want to know more about tracking options for your site, don’t be shy we’re happy to assist. Simply contact us

Tags: google analytics, tracking, Video Marketing, reporting

Previous: {{ previousBlog.sTitle }}

Posted {{ previousBlog.dtDatePosting }}

Next: {{ nextBlog.sTitle }}

Posted {{ nextBlog.dtDatePosting }}

You might also like

Creative branding ideas

6 Branding Tips To Outshine Your Competitors

24 June 2024

Posted by Brigitte Evans in Industry Experts

We review six creative branding tips and ideas to outshine your direct competitors while helping you stand out from the crowd and build a loyal cust...

Read more
Google TV ad network

What Is The Google TV Advertising Network?

14 June 2024

Posted by Che Kohler in nichemarket Advice

The new Google TV network is now available to advertisers via Google Ads and Google Display & Video 360 for campaigns focusing on the United States

Read more

Leave us a comment


{{comment.iDayLastEdit}} day ago

{{comment.iDayLastEdit}} days ago


Sign up for our newsletter