Google Tag Manager Video Tracking: Full Guide

Will Rice
First published November 1st, 2023
Last updated November 1st, 2023
Learn Google Tag Manager Video Tracking, from YouTube to Vimeo, and utilise basics to advanced techniques for tracking video marketing.
Google Tag Manager Video Tracking: Full Guide

Video content has become a crucial aspect of digital marketing, and tracking user interactions with these videos is equally essential. Google Tag Manager (GTM) offers a powerful solution to implement video tracking for platforms like YouTube and Vimeo.

This comprehensive guide will walk you through the process of setting up Google Tag Manager for video tracking, allowing you to gain valuable insights into user behaviour and optimise your video marketing efforts.

We’ll cover everything from the basics to advanced tracking techniques, ensuring you have a robust understanding of this essential tool.

If you’re looking for details on how to use enhanced measurement to track videos within GA4, then we have a detailed guide on that. This article will focus on using GTM video tracking.

Use the contents section or click on the following link to skip to the steps for setting up Google Tag Manager video tracking if that’s what you’re here for.

 

What is Google Tag Manager?

Google Tag Manager (GTM) is a free tool from Google that simplifies the process of adding, updating, and managing tracking codes on your website.

Instead of manually adding code snippets to your website’s HTML, GTM features provide a user-friendly interface for deploying tags, triggers, and variables.

This makes it easier to manage your digital marketing efforts and collect valuable data without relying on developers for every change.

 

Benefits of using GTM for video tracking

Using GTM for video tracking offers several advantages:

  • Ease of implementation: GTM’s user-friendly interface allows even non-technical users to implement complex tracking without touching the website’s code. This is especially useful for video tracking where events can be numerous and varied.
  • Flexibility: GTM is highly customisable, making it suitable for tracking different video platforms like YouTube and Vimeo. You can also implement custom tracking based on your specific goals.
  • Version control: GTM keeps a version history of your container, allowing you to roll back to previous configurations if needed. This feature is valuable for troubleshooting and experimenting with tracking settings.
  • Testing and debugging: GTM has built-in debugging tools, which can help ensure your tracking is working as expected before it goes live. This is crucial for preventing data discrepancies.
  • Reduced Dependency on Developers: With GTM, marketers have more control over tracking, reducing the need to involve developers for every tracking change. This improves the efficiency of your marketing campaigns.

 

Preparing for video tracking with GTM

Before we delve into the specific steps for tracking YouTube and Vimeo videos using Google Tag Manager, there are some essential preparatory tasks.

 

Create a Google Tag Manager account

If you haven’t already, you need to create a Google Tag Manager account. Here’s how:

  1. Go to the Google Tag Manager website.
  2. Sign in with your Google account.
  3. Click on “Create Account.”
  4. Follow the on-screen instructions to set up your GTM account.

Once your account is created, you’ll be provided with a unique GTM container ID.

 

Install Google Tag Manager on your website

To begin using GTM on your website, you need to install the GTM container code on your site. Here’s how:

  1. In your GTM account, select your container.
  2. Click on “Install Google Tag Manager.”
  3. You’ll be provided with two code snippets – one for the ‘<head>’ section of your website and another for the ‘<body>’ section.
  4. Copy and paste these code snippets onto your website’s HTML, just after the opening “ tag and immediately after the opening “ tag, respectively.
  5. Save and publish your website.

 

code for installing google tag manager to a website

 

Now, Google Tag Manager is installed on your website, and you can start creating tags for video tracking.

 

Understanding data layer

Before proceeding, it’s essential to have a basic understanding of the data layer. The data layer is a JavaScript object on your website that contains information you want to track. It acts as a bridge between your website and GTM, allowing you to capture specific data and events.

For video tracking, the data layer can be used to pass information such as video IDs, play/pause events, and more. You’ll need to work with your website developer to ensure the data layer is properly set up to capture the information you need.

Now that you’ve completed the preparatory steps, let’s move on to the specific video tracking setup for YouTube and Vimeo.

 

YouTube video tracking with Google Tag Manager

YouTube is one of the most popular video hosting platforms, and tracking user interactions with YouTube videos on your website is essential for understanding user engagement. Here’s how to set up YouTube video tracking using Google Tag Manager.

 

Setting up a YouTube Video tracking tag

To track YouTube videos, you’ll need to set up a new tag in Google Tag Manager. This tag will enable you to capture various video interactions. Here’s how:

  1. In your Google Tag Manager account, navigate to your container and click on “Tags.”
  2. Click on “New” to create a new tag.Button for creating a new tag in GTM
  3. Name your tag, and under “Tag Configuration,” select “YouTube Video.”
  4. In the “YouTube Video ID” field, you can either enter the video ID manually or use a variable from the data layer. Using a variable allows for dynamic tracking of different video IDs.
  5. Configure other settings such as tracking start, progress, and completion events.Configuring trigger settings such as start, progress, and complete
  6. Under “Triggering,” specify when the tag should fire. This can be a page view or a custom event trigger. If you want to track video interactions on specific pages, you can create a custom trigger.
  7. Save the tag.

 

Tracking video views

One of the most basic video tracking metrics is video views. To track video views using Google Tag Manager:

  1. Create a new tag as described in the previous section.
  2. Set the “Track Type” to “Video View.”
  3. Choose your trigger, which can be a page view or a custom event trigger.
  4. Save the tag.

This tag will capture video views, and you can use this data to measure the popularity of your videos.

 

Tracking video play, pause, and completion events

To gain a deeper understanding of how users interact with your YouTube videos, you can track play, pause, and completion events.

  1. Create a new tag in GTM.
  2. Set the “Track Type” to “Video Play,” “Video Pause,” or “Video Complete,” depending on the event you want to track.
  3. Configure your trigger, which can be a page view or a custom event trigger.
  4. Save the tag.

These tags will provide insights into user engagement and behaviour while watching your YouTube videos.

 

Tracking video progress

Tracking video progress is valuable for understanding where users drop off or engage the most. You can set up tracking for specific video progress percentages.

  1. Create a new tag in GTM.
  2. Set the “Track Type” to “Video Progress.”
  3. Configure the progress thresholds you want to track, such as 25%, 50%, and 75%.
  4. Define your trigger, which can be a page view or a custom event trigger.
  5. Save the tag.

This tracking allows you to identify the points in your videos where users are most engaged or likely to drop off.

 

Tracking custom events

Aside from the standard video tracking events mentioned above, you can also track custom event parameters. Custom events are specific to your website and can include things like user registrations, form submissions after watching a video, or any other actions that matter to your business goals.

To track custom events:

  1. Create a new tag in GTM.
  2. Select “Custom Event” as the “Track Type.”
  3. Configure the tag settings to match the custom event you want to track.
  4. Define a trigger for the tag, specifying when it should fire. This might involve creating a custom trigger based on user interactions with your website.
  5. Save the tag.

Custom events can provide valuable insights into the impact of video content on user actions related to your business objectives.

 

Debugging and troubleshooting

Once you’ve set up your YouTube video tracking tags in Google Tag Manager, it’s crucial to test and debug to ensure everything is working correctly. GTM provides built-in tools to help with this:

  • Preview mode: Activating the preview mode in GTM allows you to test your tags without affecting your live website. This mode displays the tags that are firing on each page, making it easier to verify that your tracking is functioning as expected.
  • Debug console: The debug console within GTM provides detailed information about the events and tags that are firing. This is a valuable resource for troubleshooting any issues with your tracking setup.
  • Data layer viewer: If you’re using a data layer, you can use the Data Layer Viewer to inspect the data being passed to GTM. This can help identify any discrepancies between what’s expected and what’s actually being captured.
  • Real-time reports: Google Analytics (GA4), if integrated with GTM, provides real-time reports for tracking events and conversions. Use this to confirm that the data is being sent to Google Analytics correctly.

By thoroughly testing and debugging your tracking setup, you can be confident that you’re collecting accurate data that will help you make informed marketing decisions.

Vimeo video tracking with Google Tag Manager

Vimeo is another popular platform for hosting videos. Just like YouTube, you can use Google Tag Manager to track user interactions with Vimeo videos on your website.

 

Setting up a Vimeo video tracking tag

To track Vimeo videos with GTM, you’ll need to set up a new tag. Here’s how:

  1. In your Google Tag Manager account, navigate to your container and click on “Tags.”
  2. Click on “New” to create a new tag.
  3. Name your tag and, under “Tag Configuration,” select “Custom HTML.”
  4. In the HTML field, you’ll need to use JavaScript to interact with the Vimeo Player API. This API allows you to control the Vimeo video player and capture events.HTML field for adding javascript code
  5. Configure the trigger for when this tag should fire, such as a page view or custom event trigger.
  6. Save the tag.

 

Tracking Vimeo video views

To track Vimeo video views, you’ll need to use the Vimeo Player API to capture the “play” event.

  1. Create a new tag as described in the previous section.
  2. In the HTML field, add JavaScript code to capture the “play” event:JavaScript code to capture the video play event
  3. Configure the trigger for the tag to fire when the “play” event is captured.
  4. Save the tag.

This tag will capture video views for Vimeo videos embedded on your website.

 

Tracking Vimeo video progress

To track video progress, you’ll need to capture the time at which the user is watching the video. The Vimeo Player API provides events for time updates.

  1. Create a new tag in GTM.
  2. In the HTML field, add JavaScript code to capture time update events:JavaScript code to capture time update events
  3. Configure the trigger for the tag to fire when the “timeupdate” event is captured.
  4. Save the tag.

This tag will allow you to track the progress of Vimeo videos.

 

Tracking Vimeo custom events

Just as with YouTube videos, you can track custom events related to Vimeo videos. These events might include interactions like sharing the video, liking it, or any other action that is relevant to your marketing goals.

To track custom events:

  1. Create a new tag in GTM.
  2. In the HTML field, add JavaScript code that captures the Vimeo video’s custom events:JavaScript code that captures the Vimeo video's custom events
  3. Configure the trigger for the tag to fire when the custom event is captured.
  4. Save the tag.

Custom events can provide insights into user engagement beyond standard video metrics.

 

Debugging and troubleshooting Vimeo video tracking

Just like with YouTube video tracking, debugging and testing are crucial when tracking Vimeo videos through Google Tag Manager. You can use the same debugging and testing techniques mentioned in the previous section to ensure your tracking setup is working correctly.

 

Advanced video tracking techniques

While the basic setup covered in this guide will address most video tracking needs, advanced users may require more sophisticated tracking methods. Here is an outline of some more advanced techniques to consider:

 

Cross-domain tracking

If your videos are embedded on multiple domains or subdomains, you may need to implement cross-domain tracking to consolidate user data accurately. Google Tag Manager allows for cross-domain tracking, but it involves configuring additional settings in your tags and triggers to ensure seamless tracking across different domains.

 

Enhanced e-commerce tracking

For e-commerce websites, tracking video interactions alongside product views and purchases is essential. Google Tag Manager can be configured to work with Google Analytics 4 Enhanced E-commerce tracking, providing detailed insights into how videos contribute to your conversion funnel.

 

User ID and logged-in user tracking

If your website requires users to log in, you can track video interactions on an individual user level by implementing user ID tracking. This allows you to understand how specific users engage with your videos and tailor marketing efforts accordingly.

 

Heatmaps and session recordings

For a more in-depth analysis of user behaviour, consider integrating tools like Hotjar or Crazy Egg. These tools provide heatmaps and session recordings that can be linked to video tracking data from GTM, giving you a comprehensive view of the optimised user journey, which is simply how visitors navigate your site and interact with videos.

 

GTM video tracking FAQ

Can I use Google Tag Manager to track videos on platforms other than YouTube and Vimeo?

Yes, Google Tag Manager is highly versatile and can be used to track videos from various platforms, including self-hosted videos on your website or videos from other third-party platforms. You can create custom HTML tags in GTM to track these videos and tailor your tracking to your specific needs.

 

Is it possible to track video interactions on mobile devices using Google Tag Manager?

Yes, you can track video interactions on both desktop and mobile devices using Google Tag Manager. The tracking setup is similar, but you should ensure that your triggers and tags are designed to work on mobile-responsive web pages to capture user interactions on smartphones and tablets.

 

How can I use the video tracking data collected by GTM to improve my marketing efforts?

The data collected through video tracking in GTM can be used to make data-driven marketing decisions. You can analyse user engagement metrics to optimise your video content, create targeted marketing campaigns based on user behaviour, and make improvements to your website’s user experience by understanding how users interact with your videos.

 

Is it possible to integrate video tracking data from Google Tag Manager with other analytics tools?

Yes, you can integrate the data collected through GTM with other analytics tools like Google Analytics or other third-party analytics platforms. This integration allows you to centralise your data and gain deeper insights into user behaviour by combining video tracking data with other website metrics.

 

Are there any limitations to using Google Tag Manager for video tracking?

While Google Tag Manager is a powerful tool for video tracking, it’s essential to be aware of potential limitations. For instance, some advanced tracking features may require custom JavaScript coding skills. Additionally, the accuracy of tracking can depend on the website’s structure and the cooperation of developers for data layer setup. Therefore, understanding these limitations and seeking expert help when needed is important for successful video tracking implementation.

 

Conclusion

Google Tag Manager is a powerful tool for tracking user interactions with YouTube and Vimeo videos on your website. By following the steps outlined in this guide, you can gain valuable insights into how users engage with your video content. If you want a more in-depth guide to Google Tag Manager before you start tinkering with videos, we recommend our free and easy-to-follow GTM dev guide.

Whether you’re interested in basic video view tracking or more advanced tracking methods, GTM offers the flexibility and control you need to optimise your video marketing efforts.

Remember that accurate tracking and analysis are essential for making informed marketing decisions. Regularly review your tracking setup, perform tests, and ensure that your data aligns with your marketing goals.

By harnessing the power of Google Tag Manager, you can refine your video marketing strategy and drive better results for your business.

Will Rice
Follow me
0 0 votes
Article Rating
Subscribe
Notify of
guest

This site uses Akismet to reduce spam. Learn how your comment data is processed.

0 Comments
Inline Feedbacks
View all comments
Articles from our Blog
0
Would love your thoughts, please comment.x
()
x