How to Track YouTube Videos On Websites With Google Tag Manager (Step By Step)

YouTube Logo

Featuring YouTube videos on your website can do wonders for your  SEO, PPC, traffic, engagement, and conversion efforts. In theory, this all sounds great, right? If implemented correctly, all these things can happen; however, you won’t know if your videos are helping if you’re not tracking their on-site performance. Believe it or not, there are plenty of videos on websites that rarely get watched in full. The good news is that with Google Tag Manager, you can track the videos that people watched, what channel they came in from, what page they were on when they watched them, and whether they watched them in full or not.  Here’s how to set this all up.

Phase 1: Create 3 YouTube Triggers: “Start,” “Completed,” And “Progress”

In Analytics, we’ll want to have 3 event buckets: 1 that shows all videos that were started, 1 that shows progress (they made it 50% of the way through until they hit pause), and 1 that shows all the videos that were watched in full. See the end result below

Step 1: Enable All Video Variables

Click “Variables” From the GTM Dashboard

gtm-enable-variables

Click “Configure,” Scroll down to “Videos” and Check All Boxes

Step 2: Create The Trigger

Click “Triggers,” Then New

gtm-new-trigger

Under “User Engagement,” Choose “YouTube Video”

On the next screen, make sure only “Start” and “Add Javascript API Support for All YouTube Videos” is Checked Off

Name the trigger “Videos Started” and Save.

Repeat Step 2 twice: you want to create 1 trigger with only “Complete” checked off, and 1 trigger with “Pause, Seeking, and Buffering,” and “Progress” checked off. For progress, you’ll also want to check off “percent,” and put values like “10,25,50,75,90.” See the examples of what they should look like below.

Videos Watch In Full Trigger

Video Progress Trigger

Phase 2: Link Each Trigger to a Tag

In order to put the trigger we created to use, it must be connected to an event-based tag. Once it is published, this tag will pass our data into Google Analytics.

Step 1: Create the Tag

Click “Tags” from the Sidebar, then Click “New”

gtm-new-tag

Click Into “Tag Configuration” and Select “Google Analytics: Universal Analytics” (The First Option)

For “Track Type,” Choose “Event”

Name the Category The name of the trigger. For the sake of this example, we’ll use “Videos Started”

For “Action” Click The Plus Sign. This will open a list of variables

gtm-select-plus-sign

From Here, Click “Video Status”

Use This Menu to Fill The Label Field. In the Label Field, You’ll Select both “Video Title” and “Page Path.”

The End Result Will Be

{Video Title} – Played On {Page Path}

Doing this will allow you to see what page the video was played on.

Change “Non-Interaction Hit” From False to True.” This will prevent this data from affecting the bounce rate.

Step 2: Choose The Trigger You Created Earlier

Choose The “Videos Started” Trigger You Created Earlier

End Result In Google Analytics

Here we see the name of the video and the page that it was started on.

Step 3: Repeat Steps 1 & 2 For The Other 2 Triggers

Here’s What Each Tag Should Look Like

Videos Watched In Full

Video Progress

The action field will be a little different here.

The end result should be

{Video Status} – {Video Percent}%

Final Step: Publish The Tag, Test It, Then Dig Into The Data By Channel

Publish the tags by hitting the blue “Publish” button in the top right Corner.

To Test the Tag, Open the Real Time Report In Analytics, Click “Events,” Then Events (Last 30 Mins)” While Watching an On-Site Video In Full. If You See The Three Video Buckets Show Up, Then You Did It Right. In The Example Below, We’re Watching Orange Pediatric Therapy’s  Video On This Page

How to See What Channel The Video Viewer Came From

To see whether the video viewer came from Social Media, Paid Search, SEO, Direct, or Some Other Source…

Step 1: Go to “Events” In Google Analytics

Behavior < Events < Overview, and Choose a Date Range at the Top Right

Step 2: Click A Video Bucket, “Event” Label”, “Secondary Dimension”, and Type “Source”

Select “Source / Medium”

End Result

In this example, we can see that the Forklift Training video on this page was watched by 12 users who came from Google Ads.

If you want to laser in on a specific video, just click on it, and repeat step 2. Here’s what you would get

If you need any help at all, feel free to email or call us. Have fun collecting this valuable data!