Track video views with Google Tag Manager

Avatar
Rachel W.

Google Tag Manager (GTM) allows you to quickly and easily update segments of code from third-party vendors (collectively known as "tags") on your websites and mobile apps.

With GTM, you no longer need to add tags directly to your projects. Instead, once the GTM code has been added to your project, you can configure tags and how they deploy on your websites from within the Google Tag Manager.

This article will show you how to configure GTM so that when a Vidyard player is present on a webpage, a script will be added that utilizes Vidyard's Progress Events API to push milestone data (% of video viewed) to Google Analytics (GA).

Install Google Tag Manager

Google Tag Manager needs to be added to the webpage where you've embedded your video to track viewing data.

  1. Go the Google Tag Manager website, then select AdminInstall Google Tag Manager
  2. Copy the code provided onto your webpage, following the instructions provided by Google

Find your Google Analytics Measurement ID

To complete the Google Tag Manager setup process, you'll need to acquire your Google Analytics Measurement ID.

  1. Sign in to your Google Analytics account, then select Admin
    Google Analytics main page with Admin settings button selected on the panel
  2. Select Data collection and modification > Data streams, then select a data stream to acquire the measurement ID Google Analytics Admin page with a data stream selected from the list
  3. Copy your Measurement ID, which appears in the format "G-" Google Data stream information with Measurement ID highlighted

Set up your tags, triggers, and variables in GTM

Note: these resources are provided for instructional purposes only, and are not supported by Vidyard. Vidyard does not offer support for third-party tools and platforms, or technologies such as JavaScript, jQuery, or CSS.


The steps below will walk you through how to import our pre-made GTM .json container into your Google Tag Manager, which provides the tags, triggers, and variables you need to track viewing data. After importing this container, set up your tags and variables with your Google Analytics Measurement ID to ensure your data flows properly.

Download and import the GTM container

  1. Download the GTM container .json file to get started
  2. Sign in to your GTM account, then go to AdminImport Container Google Tag Manager admin screen with option to import container file selected from the list
  3. Select Choose Container file, and choose the .json file from Step 1
  4. Choose either New or Existing Workspace (depending on your needs)
  5. Select Merge to keep the built-in variables from the GTM container you downloaded
    • Do not choose Overwrite, as this option deletes the contents of the container

Container import page showing option to upload file, select a Workspace, and choose import options

Set up variables and tags with your Google Analytics Measurement ID

  1. Select WorkspaceVariables, then select Web Property ID under User-Defined Variables Google Tag Manager main page with Workspace Variables option highlighted and Web Property ID selected
  2. Use the icon to enter your Measurement ID ("G-") under Variable Configuration > Value, then Save when finished Edit page for variables highlighting where to enter your measurement ID in the value field
  3. Select WorkspaceTags, then select Google Analytics GA4 Configuration Google Tag manager main page with Workspace Tags option highlighted and a Vidyard specific tag selected
  4. Use the icon to enter your Measurement ID ("G-") under Tag Configuration > Tag ID, then Save when finished
    • If you already have a tag called Google Analytics GA4 Configuration, you can delete the tag that was added with the .json container to avoid duplicates
    • The Vidyard Listener Tag (Workspace > Tags > Vidyard Listener) contains custom HTML coded console logs to assist in troubleshooting. These are optional, and can be removed if unnecessary. Edit page for tag highlighting where to enter your measurement ID in the tag ID field
  5. Select Submit on the GTM main page to save your changes, then Publish to push them to your Google Tag Manager Google Tag Manager main page with option to submit and publish changes to tags and variables

 

Need support

Submit a ticket or start a chat. We'll provide a self-serve resource or connect you with our support team, available 24x5.

Chat with Our Team