Have you ever wondered how many users watch an embedded YouTube video on your website or blog? In this article, I will share how to track embedded youtube videos play/pause on your website or blog via Google tag manager.
So, let’s begin with setting up YouTube video tracking using Google tag manager.
You should be aware of Google Tag Manager Lingo. Moreover understand what a trigger, tag, and the built-in variables available are.
The next is, you should have a Google Tag Manager for tracking site’s traffic in Google Analytics though it isn’t a must. We will still need to have the Google Analytics Property ID to send scroll depth data to Google Analytics.
If you aren’t sure, refer to my article – How to Connect Google Analytics With Google Tag Manager first and then continue with this article.
Next, we need to create a user-defined variable. Just follow the below steps with appropriate configurations, and you will be all fine with it.
Create a new variable “Data Layer” as (Video Elapsed Time) Variables > User-Defined Variables > New
YouTube provides the amount of time video is played into the gtm.videoElapsedTime. We take that value and define a Data Layer Variable to be able to use in GTM Tag.
Event Tracking Parameters
Log in to your Google Analytics account and locate the Affiliate Link Clicks event under Behavior > Events > Overview. Look for the category that we assigned in step 2 which is YouTube Video Tracking.
Under Actions, it will show Video title and URL.
And under Event Label, it will show the “Video Status” of being played and paused.
Check out affiliate link clicks, external link clicks, page scroll depth and Google ads conversion using the Google tag manager.
Free Google Ads Tutorial for an absolute beginner covering campaigns and their types, networks, keywords,…
Do you want to make money programming in Java? Here are 6 creative ways for…
9 smart ways for freelancers to achieve financial freedom. First, you have to believe it…
With so many programming languages and resources available, it can be information overall to learn…
Wise review from an Indian freelancers point of view to receive payments in India. How…
There are 3 types of clients who want you to lower the price. How to…