Blog

Home > Analytics FAQs > How to Track YouTube Videos in Google Tag Manager

How to Track YouTube Videos in Google Tag Manager

YouTube video tracking has now become easier since the release of built-in video trigger in Google Tag Manager. If you are looking to track embedded YouTube videos, this guide is for you.

Without wasting time explaining the same things, let's face the new video trigger and variables. Follow the steps below:

Step1: Enable Built-in Video Variables

Before doing anything specific, click on variables and enable all the new video built-in variables.

 enable GTM video variables

Step2: Create & Configure Video Trigger

Open triggers tab and click on the new button to create a new trigger.

Enter a unique name for the trigger, click trigger configuration, and select YouTube Video as the trigger type.

Configure the trigger as displayed in the image below. You can uncheck the options you don’t want to track.

 youtube video trigger

The first three things in the above image are understood.

You can track the video progress in two ways. The first is by percentages, and second by time thresholds. Both are used to track how long a video has been played.

In the advanced section, by checking the ‘Add JavaScript API support to all YouTube videos’ will fire the trigger on videos that have JS API support.

Once you configure this, save the trigger.

Step3: Create YouTube Video Tag

Now, navigate to tags section and create a new Google Analytics tag.

Configure the tag as displayed in the image below.

You will use the video variables you have enabled in the step to send event data to Google Analytics.

Add the trigger we created in the second step to this tag.

Save tag and open preview mode. Open your web page containing the video in a new tab.

If you have done the above steps carefully, the YouTube event will fire.

Now that we have confirmed video tracking is working successfully. You can now publish changes in Google Tag Manager.

If you have any questions related to this article, please ping us on Twitter or share if you find this helpful.

Share:

Data that Moves Your Business

Connect with Marketlytics

Join 120,000+ Marketers

Stay ahead with expert insights on marketing analysis, data-driven strategies, and industry trends.

Omair

Revenue Growth Analyst
Data Unification Specialist, previously at a leading Ecommerce Giant

Case Studies

Discover our latest success stories
and see how innovative strategies
drive measurable results.

Get a Free Attribution Dashboard

Gain clear insights into what’s
driving conversions and optimize
your marketing spend with ease.

Are you Ready to Fast Track your Marketing Attribution Decisions and Maximize your ROI?

Businesses that leverage automated marketing
attribution see a 20-30% improvement in ad
spend efficiency.