Do you embed YouTube videos on your website?
If so, this post is for you.
They click it and Google Analytics tracks it. Thatβs how it works, right? It tracks the visitorβs actions and reports it back to you, right? Not exactly.
Lots of clicks arenβt tracked in Analytics by default. Thatβs because some clicks donβt bring the visitor to a new page. And pageviews are mainly what Google Analytics is tracking …unless you do a bit of extra setup.
Video plays are #7 on our list of interactions that arenβt recorded in Analytics without event tracking.
Each of these interactions are trackable, but only through event tracking. And the easiest, fastest way to track events is with Google Tag Manager.
This video shows how to track YouTube video views in Google Analytics using Google Tag Manager. The play button on this video is tracked using the method described here…
Once complete, youβll be able to see which videos are viewed how many times. Weβll also show you how to use Google Analytics segments to compare the behavior of video watchers with non-watchers.
Three notes:Β
To set up event tracking, weβll create a tag and a trigger in Google Tag Manager. But first, weβll need to configure a few variables. Log into Google Tag Manager, then follow these steps:
The variables weβll need are built-in, but not configured by default. So weβll need to take this step first.
A. Click on βVariablesβ in the menu on the left.
B. Click on βConfigureβ in the top right.
Now youβre looking at a list of the built-in variables.
C. Check the box for every variable in the βVideosβ section. Even if you donβt plan to use them all, thereβs no harm in configuring all of them.
All done. Now weβll create the trigger. You could also create the Tag first. It doesnβt really matter.
A. Click on βTriggersβ in the menu on the left.
B. Click on βNewβ in the top right.
C. Give your trigger a name. Give it a simple, descriptive, standard name that will make sense when your successor sees it five years from now. I recommend βYouTube Videoβ or something similar.
D. Click βChoose a trigger typeβ …thatβs the middle of the big white Trigger Configuration box.
E. Select βYouTube Videoβ from the menu.
Next, weβll tell the trigger when to fire. These are the moments when data will be captured within the browser and then sent to Google Analytics servers.
F. Check the first two boxes: Start and Complete.
G. Leave βDOM Readyβ in the dropdown box under βEnable this trigger on.β That means the trigger will be ready to fire when the data-layer on the browser is ready to listen. No need to change this.
Optional settings:
H. Check Pause/Seek/Buffering, and Progress.
For βProgressβ you can have the trigger fire either when the video hits a certain percentage completion or when the video hits a certain time threshold (hours, minutes and seconds)
I. Check the βAdd JavaScript API supportβ box.
There is a fancy way to embed YouTube videos. It uses an API. You can check this box whether or not you use the API. Either way, it wonβt cause any problem.
J. Save the trigger by clicking the big blue button in the top right.
Next, weβll make the tag that tracks video views. This step is easy because Google Analytics tag for YouTube are built into GTM already. Thisβll be a piece of cake.
A. Click on βTagsβ in the menu on the left.
B. Click on βNewβ in the top right.
C. Give your tag a name. Again, name it something simple, descriptive and standard. I recommend βGA – Event – YouTube.β
D. Click βChoose a tag typeβ …thatβs the middle of the big white Tag Configuration box.
E. Select βGoogle Analytics: Universal Analyticsβ from the menu ...assuming you havenβt yet switched over to App + Web!
Now weβre going to set up the event.
F. Select βEventβ from the Track Type dropdown.
G. In the Category field, Type βVideo viewβ (or something similar).
H. To the right of the Action field, click the lego icon to choose a variable (which we configured in step one). Select βVideo Titleβ from the list.
I. Same. To the right of the Label field, click the lego icon and choose βVideo Statusβ from the variable list.
Optional settings:
J. To the right of the Value field, click the little lego icon to choose a variable (which we configured in step one). Select βVideo Percentβ from the list. This lets you track how much of each video your visitors watch.
K. Recommended: Change βNon-Interaction Hitβ to True.
This will keep the event from affecting your bounce rate. Personally, I think bounce rate is an overrated metric. But if it matters to you, hereβs where you can control whether this event will affect your bounce rate.
Unless you change this to true, visits (sessions) with video views will not be counted as bounces (one-hit sessions).
L. Under Google Analytics Settings, add your accountβs Tracking ID.
M. Click anywhere in the big white Triggering box to choose a trigger for your new tag.
N. Click on the YouTube Video trigger from the list.
Almost done! Now that you have a new tag and a new trigger in your Workspace, your last step is to submit this new container to your site. Itβs the blue button in the top right.
Tag Manager will give you the opportunity to document your new container. Add a few notes such as βCreated a new tag and trigger for tracking YouTube videos viewsβ and sign your name.
You can test your event just by going to the Real Time > Events report. Take out your phone, go to a page with a video and click play. See the event?
Here are three more ways to test.
Depending on how much traffic you get to the pages with videos, you may need to let it run for a few weeks before you have enough data to analyze.
When youβre ready, hereβs a fun way to look at viewers and non-viewers separately to measure the performance of your video-enhanced content.
Next, repeat the process but select βExcludeβ from the drop-down and name this group βVideo non-watchersβ or something similar.
Now as you browse through Analytics, youβll see all of the data broken into these two groups: those who view videos and those who donβt.
All that work is only useful if we get some meaningful, actionable insights and take action.
You can look at aggregate data to see general differences between these groups. But itβs far better to look at the performance at the page/video level.
Go to Behavior > Site Content > Landing Pages and pick a page with a video.
With the two segments turned on, youβll quickly see the following:
Here are the answers to those questions for a page/video on this website:
You can now check the specific ROI for any video on any page.
Thanks, event tracking!
Thanks, Google Tag Manager!
For a more robust way to track video engagement, our friend and Analytics expert Charles Farina shows how to go deeper using custom dimensions in this post.
Now that you know the impact of video on the performance of a page, use your new event to answer more questions and do deeper analysis.
Any page with high traffic (pageviews) and low engagement (avg. time on page) is a good candidate for video. Videos here would have both the greatest reach and highest impact.
If the video is more often seen on your site that YouTube, edit the title and description on YouTube to better align it with a keyphrase. Maybe you can get it to rank higher there.
For videos with a very low play rate (less than 10%), make a better thumbnail. Videos with thumbnails that include both faces and headlines get viewed the most.
Recommended: The 3 types of marketing videos
Youβre now looking at the Event Labels for that video. This is how people are interacting with that specific video. Even without checking the percentage watched, you can see if viewers are jumping around.
If βseekβ and βpauseβ have bigger totals than start, then people are jumping around. The video may be very long or start slow. This is what the report looks like for a long, training video.
Embedding videos is easy. Tracking video views takes a bit more work. But itβs worth it. Once you have this set up on your site, youβll be measuring video ROI like a champ.
By signing up you agree to our Privacy Policy.
Hi there,
I followed all the steps mentioned above but when I try to create a segment, I can’t see ‘Video view’ in the dropdown. Can you please help me here?
Any advice on how to do this with natively embedded videos hosted on AWS?
I placed a YouTube video from another account on my landing page. The tag manager account I used to tag the video is from another gmail address. Will I get analytics from that video?
Just want to say that I have never used GTM before but I managed to set this up reading this article! Thank you for the clear instructions.
Awesome article, Andy! Hope you are doing well π I am curious, we have videos embedded on our site not through YouTube but through Vidyard which is connected to our HubSpot account. We use a Vidyard code to embed these on our website. Will this event tracking still work the same or would I need to do something differently? Thanks!
When I audit someone’s site for their Google Analytics implementation, this is one of the most common things I see that needs to be done. Good instruction (as always!) Andy. But truly, I think the final minute is the most valuable part of your video. It does little good to track things in GA if you don’t know how to use the data once you have it! Bravo!
It’s all about the analysis, right?
I kind of blew off instructions for tracking non-YouTube videos. Do you do much of this, Tom? Can it be done with just GTM and without custom HTML?
Thinking of you (and referring you) often, Tom! I wish we could hang out more. π
Bounteous, Cardinal Path and Analyticsmania all have Vimeo tracking GTM containers that you can import. Unfortunately it’s not nearly as easy to set up as YouTube tracking π
Does this work on non Youtube videos?…I have uploaded a video in my website and try to track using this but the the tag is not firing..so I was thinking maybe because it was not a Youtube video
I have only been online 12 years..lol and this is the first time I am ever hearing this stuff or even thought of most of it. Leave it to Andy to once again over deliver in the content telling uss important things we are missing and helpful tips and insight as opposed to just spewing the same stuff everyone else is talking about. A big Thanks!
Glad you liked this one! Video tracking is a big gap that a lot of people miss…
Hey Andy,
Very nice & informational blog on youtube video tracking, but it would be great if you will show us how to track other platforms video too, such as vimeo.
Thanks
Vimeo tracking is not as straightforward as YouTube tracking. Here is one resource that shows you how to do it. https://www.bounteous.com/insights/2017/04/07/vimeo-tracking-gtm/