• Courses
    • Courses
    • Course bundles
  • Blog
  • Services
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • About
    • About
    • Contact
  • Login
  • Courses
    • Courses
    • Course bundles
  • Blog
  • Services
  • Resources
    • Youtube channel
    • E-books and Guides
    • GTM Recipes
    • View All Resources
    • GTM Community
    • GA4 community
  • About
    • About
    • Contact
  • Login

June 4, 2020

Google Tag Manager Video Tracking Guide: Beyond Youtube

Updated: June 4th, 2020.

Important: this blog post uses Universal Analytics (GA3) examples. If you are looking for Google Analytics 4 examples instead, read this blog post.

To understand what website visitors are doing on your site, tracking pageviews is far from enough. You should also consider other interactions, such as clicks, views of particular elements, video interactions, etc.

When it comes to videos, the most popular embedded video players are Youtube (I have no stats to support this; just saying this based on what I’ve seen on other websites). But what if your website is using a different player (like Vimeo or maybe a generic HTML5 player)?

That’s not a problem, because you can track them with GTM.

In today’s blog post, I’ll show you how to track videos with Google Tag Manager. I’ll cover Youtube video tracking, Vimeo video tracking, and will also mention several other players.

Note: this blog post teaches how to track events with Universal Analytics. If you want to get familiar with event tracking in Google Analytics 4, you can also refer to this blog post.

 

Table of contents

+ Show table of contents +

  • Youtube video player tracking
    • Step 1. Create a Youtube Video Trigger
    • Step 2. Enable built-in Youtube video variables
    • Step 3. Create a Lookup Table variable
    • Step 4. Create a Google Analytics tag
    • Step 5. Test the setup
  • How to track Vimeo video player with Google Tag Manager (custom solution)
  • Identify the video player
    • Step 1. Create a variable “Is Vimeo player present on a page”
    • Step 2. Vimeo auto-event listener
    • Step 3. Create Data Layer Variables and Custom Event Trigger
    • Step 4. Create a Google Analytics tag
    • Step 5. Test the setup
    • To sum up
  • Six Google Tag Manager Video Tracking Recipes. All Unified.
  • Final words

 

So, what’s the plan?

First, we’ll take a look at the most common video tracking example in Google Tag Manager: Youtube video trigger. Then, I’ll show you an example with a video player that is not supported by GTM by default. That’s Vimeo.

And finally, I’ll also give you some ready-made solutions (recipes) designed for various embedded video players.

Ready? Let’s go.

Google Tag Manager Ebook Bundle

 

Chapter 1. How to track Youtube videos with Google Tag Manager

If you are in a hurry, I have created a ready-made Youtube video tracking recipe. Download it, import, configure (according to instructions) and it will automatically start tracking Youtube videos on your website in no time.

But if you want to understand the ins and outs of the Youtube video tracking, then continue reading.

Here are the steps you need to complete in order to track Youtube videos with Google Tag Manager.

 

Step 1. Create a Youtube Video Trigger

It all starts with a trigger. In Google Tag Manager, go to Triggers > New > Trigger Configuration and choose Youtube Video. Then enter the following settings:

track youtube video with google tag manager

You can change the Percentage threshold to anything you like, just separate them with a comma. Also, you can enable Pause, Seeking, and Buffering tracking. Personally, I prefer tracking Start, Complete, and Progress (e.g. 25% of the video was watched).

Also, even though the Add JavaScript API support to all Youtube videos is an Advanced setting, I enable it by default because it increases the change that Youtube video tracking will work.

 

Step 2. Enable built-in Youtube video variables

In Google Tag Manager, go to Variables > Configure and enable all video-related variables.

track youtube video with google tag manager

 

Step 3. Create a Lookup Table variable

Here’s what we want to achieve:

  • If a visitor starts or completes a video, we want to send the word “start” or “complete” to Google Analytics
  • But if the visitor has watched a certain amount of a video (e.g. 25%) we want to send not only the word “progress”. We also will send the percentage of a watched video, e.g. progress 25%

To do that, we will create a lookup variable table in GTM that will return a particular output based on the Youtube video interaction.

In GTM, go to Variables > New > Lookup table and enter the following settings:

  • In the Input Variable field enter the {{Video Status}} variable
  • Then in the Input field enter “progress” (without quotation marks, all lowercase) and then in the Output field enter {{Video Status}} {{Video Percent}}%
  • Finally, enable “Set Default Value” checkbox and insert {{Video Status}} variable once again.

track youtube video with google tag manager

What did we do here?

If the video player status is “progress”, this means that a certain percentage of a video was seen by a visitor and this event became available in the preview and debug mode.

In this case, we want this lookup variable to return the video player status (progress) and also the video percentage that was watched together with a % sign.

But if the Video status is not “progress”, then this lookup variable will just return the name of the status (for example, start, complete, etc.). That’s why I have configured the “Set Default Value” checkbox.

 

Step 4. Create a Google Analytics tag

Now, it’s time to send the Youtube video data to Google Analytics. In GTM, go to Tags > New > Universal Analytics and enter the following settings.

If you are new to Google Tag Manager and have no idea what a Google Analytics Settings Variable is, click here.

You can choose some other names/values in the Event Category/Action/Label fields if you want (but I highly recommend following this naming convention).

Also, keep an eye on the Event Action field. We have entered the Lookup Table variable here.

Also, assign the Custom Event trigger (for video event) to that tag.

 

Step 5. Test the setup

Once you have completed all previous steps, it’s time to test. Enable/Refresh the Preview and Debug mode, refresh the page on your website with the embedded Youtube video player and try to interact with it.

First of all, you should start seeing Youtube Video events in the preview mode. If you don’t see them, read this troubleshooting guide.

track youtube video with google tag manager

Click one of them and check whether your Google Analytics tag has fired.

track youtube video with google tag manager

If yes, then go to Google Analytics Real-time reports > Events and check whether you see them too. If you cannot see the events, read this troubleshooting guide.

After a while, your events data will appear in Standard Google Analytics reports as well. But that might take up to 24 hours.

 

Chapter 2. How to track Vimeo video player with Google Tag Manager (custom solution)

What if your website does not contain embedded Youtube videos? What if you are using something else? In that case, the built-in Youtube video tracking in Google Tag Manager will not work. You need to find some custom solution.

 

It all starts with identifying the video player

Before you start with the actual tracking of video player interactions, first you need to identify what kind of video player is that. Video players clearly show their logo in the player box (e.g. Vimeo), others will probably be not that obvious.

If your case is the latter, do this. In your browser, open developer tools (in Chrome, that’s F12 (on Windows)) and then go to Elements tab. Then click this button…

… and then click on the player itself. Now try to browse a bit and locate some clues mentioning the player provider name. For example, in this case, the player that I’m inspecting is JW player.

If you can’t find the name, most likely it is an HTML5 video player.

Once you identify the name of the video player, just google [ video player name ]  tracking with Google Tag Manager and you should find some guide or tutorial.

Let’s imagine, that in our case, we see the “Vimeo” logo at the corner of the embedded video player.

 

Step 1. Create a variable “Is Vimeo player present on a page”

In order to track Vimeo players with GTM on a page, we will need to add a lengthy code to the container. Loading that code on every page is not optimal and will affect the page loading speed, that’s why we need to activate that code ONLY when the Vimeo player is actually embedded on that site.

To do that, first, we need to create a Custom JavaScript variable and paste the following code:

function () {
 for (var e = document.getElementsByTagName("iframe"), x=0; x < e.length; x++) {
 if (/^https?:\/\/player.vimeo.com/.test(e[x].src)) {
 return true;
 }
 }
 return false;
}

If the Vimeo player is embedded in the page, this variable will return true.

Then create a pageview trigger and use that Custom JavaScript variable in it. If the Vimeo player is present, this trigger will be activated. If there is no Vimeo player, that trigger will remain silent.

track vimeo player with google tag manager

 

Step 2. Vimeo Auto-Event Listener

Now, it’s Vimeo Listener’s turn. A listener is a function (or a bunch of functions) that are built to keep looking for certain interactions on a page. In this case, the listener will be looking for Vimeo player interactions. If it spots one, it will make that data visible in the Preview and Debug mode.

Create a Custom HTML tag and paste the following code. The original authors of this code are Bill Tripple and Bogdan Bistriceanu from Cardinal Path).

This listener was recently slightly updated to support some changes in Vimeo.

<!--
Google Analytics Tag Manager (V2) custom HTML tag for Vimeo video tracking

Copyright 2016, Cardinal Path, Inc.

Original author: Bill Tripple <[email protected]>
Revised by: Bogdan Bistriceanu <[email protected]>
Updated by: Julius Fedorovicius <[email protected]> and Richard Outram <[email protected]>

Version 2.1
-->

<script>
var dataLayer = (typeof(dataLayer) !== "undefined" && dataLayer instanceof Array) ? dataLayer : [];
var videoLabels=[];
var lastP=[];

//we declare variables that will hold information about the video being played
var _playerTitle = {}, _playerAuthor = {}, _playerAuthorURL = {}, _playerUploadDate = {}; 

try{
 init();
}
catch(err){
 dataLayer.push({
 'event': 'gtm.error',
 'errorMessage': e.message,
 'tag': 'CP - UA - Vimeo Video Listener'
 })
}
function init(){
 try{
 var player=document.getElementsByTagName("iframe");
 for (i = 0; i < player.length; ++i) {
 var url=player[i].getAttribute("src");

 if(/player\.vimeo\.com\/video/.test(url)){ // vimeo iframe found
 if(!player[i].hasAttribute("id")){ // id attribute missing
 player[i].setAttribute("id","vimeo_id_"+i); // add id attribute
 }
 var urlUpdated=false;
 if(!/api=/.test(url)){ // check to see if api parameter is in src attribute
 url=updateUrl(url,"api",1);
 urlUpdated=true;
 }

 if(!/player_id=/.test(url)){ // check if player_id is in src attribute
 url=updateUrl(url,"player_id",player[i].getAttribute("id"));
 urlUpdated=true;
 }
 if(urlUpdated){ // repopulate src attribute with added parameters
 player[i].setAttribute("src",url)
 }
 videoLabels[player[i].getAttribute("id")]=player[i].getAttribute("src"); // id to label dictionary
 }
 }

 // Listen for messages from the player
 if (window.addEventListener){
 window.addEventListener('message', onMessageReceived, false);
 }
 else {
 window.attachEvent('onmessage', onMessageReceived, false);
 }
 }
 catch(err){
 }
}

function updateUrl(url,param,value){
 try{
 return url+((/\?/.test(url)) ? "&" : "?")+param+"="+value; 
 }
 catch(err){
 }
}

// Handle messages received from the player
function onMessageReceived(e) {
 try{
 var data = e.data;
 
 if(typeof data === "string"){
 data = JSON.parse(data);
 }
 
 switch (data.event) {
 case 'ready':
 onReady(data);
 break;
 case 'play':
 onPlay(data);
 break;
 case 'pause':
 onPause(data);
 break;
 case 'timeupdate':
 onPlayProgress(data);
 break;
 }
 }
 catch(err){
 }
}

// Helper function for sending a message to the player
function post(action, value) {
 try{
 var data = {
 method: action
 };

 if (value) {
 data.value = value;
 }

 var message = JSON.stringify(data);
 var player = document.getElementsByTagName("iframe");
 var url;
 var prot;


 for (i = 0; i < player.length; ++i) {
 url=player[i].getAttribute("src");

 if(/player\.vimeo\.com\/video/.test(url)){
 // Check if protocol exists
 prot = player[i].getAttribute('src').split('?')[0].split('//')[0];

 // If protocol doesn't exist, then need to append to "url"
 if (!prot){
 url="https:" + player[i].getAttribute("src").split('?')[0];
 }
 player[i].contentWindow.postMessage(data, url);
 }
 }
 }
 catch(err){
 }
}

function getLabel(id){
 try{
 return videoLabels[id].split('?')[0].split('/').pop();
 }
 catch(err){
 }
}

//our function that will use the Vimeo oEmbed API to retrieve additional information about the video
function getVimeoInfo(url, callback) {
 
 var script = document.createElement('script');
 script.type = 'text/javascript';
 script.src = url;
 
 document.getElementsByTagName('body')[0].appendChild(script);
}

//the callback function which takes the data received from the Vimeo oEmbed API and places it into the corresponding objectes
function vimeoCallback(e){
 //console.log(e);
 _playerTitle[e['video_id']] = e['title'];
 _playerAuthor[e['video_id']] = e['author_name']
 _playerAuthorURL[e['video_id']] = e['author_url']
 _playerUploadDate[e['video_id']] = e['upload_date']
}

function onReady(data) {
 try{
 //execute our function which queries the Vimeo oEmbed API once the embedded videos are "ready"
 getVimeoInfo("https://www.vimeo.com/api/oembed.json?url=https://vimeo.com/"+getLabel(data.player_id)+"&callback=vimeoCallback", vimeoCallback);

 post('addEventListener', 'play');
 post('addEventListener', 'pause');
 post('addEventListener', 'finish');
 post('addEventListener', 'playProgress');
 }
 catch(err){
 }
}

function onPlay(data){
 try{
 dataLayer.push({
 event: "video",
 eventCategory: "vimeo",
 eventAction: "vimeo play",
 eventLabel: _playerTitle[getLabel(data.player_id)].toLowerCase() + " - " + getLabel(data.player_id),
 vimeo_playerID: getLabel(data.player_id),
 vimeo_playerTitle: _playerTitle[getLabel(data.player_id)].toLowerCase(),
 vimeo_playerAuthor: _playerAuthor[getLabel(data.player_id)].toLowerCase(),
 vimeo_playerAuthorURL: _playerAuthorURL[getLabel(data.player_id)].toLowerCase(),
 vimeo_playerUploadDate: _playerUploadDate[getLabel(data.player_id)],
 nonInteractive: true
 });
 }
 catch(err){
 }
}

function onPause(data){
 try{
 dataLayer.push({
 event: "video",
 eventCategory: "vimeo",
 eventAction: "vimeo video pause",
 eventLabel: _playerTitle[getLabel(data.player_id)].toLowerCase() + " - " + getLabel(data.player_id),
 vimeo_playerID: getLabel(data.player_id),
 vimeo_playerTitle: _playerTitle[getLabel(data.player_id)].toLowerCase(),
 vimeo_playerAuthor: _playerAuthor[getLabel(data.player_id)].toLowerCase(),
 vimeo_playerAuthorURL: _playerAuthorURL[getLabel(data.player_id)].toLowerCase(),
 vimeo_playerUploadDate: _playerUploadDate[getLabel(data.player_id)],
 nonInteractive: true
 });
 }
 catch(err){
 }
}

// Track progress: 25%, 50%, 75%, 100%
function onPlayProgress(data) {
 try{
 var t = data.data.duration - data.data.seconds <= 1.5 ? 1 : (Math.floor(data.data.seconds / data.data.duration * 4) / 4).toFixed(2); if (!lastP[data.player_id] || t > lastP[data.player_id]) {
 lastP[data.player_id]=t;
 if (parseFloat(t) != 0){
 dataLayer.push({
 event: "video",
 eventCategory: "vimeo",
 eventAction: "vimeo video " +t*100+ "% Complete",
 eventLabel: _playerTitle[getLabel(data.player_id)].toLowerCase() + " - " + getLabel(data.player_id),
 vimeo_playerID: getLabel(data.player_id),
 vimeo_playerTitle: _playerTitle[getLabel(data.player_id)].toLowerCase(),
 vimeo_playerAuthor: _playerAuthor[getLabel(data.player_id)].toLowerCase(),
 vimeo_playerAuthorURL: _playerAuthorURL[getLabel(data.player_id)].toLowerCase(),
 vimeo_playerUploadDate: _playerUploadDate[getLabel(data.player_id)],
 nonInteractive: true
 })
 }
 }
 }
 catch(err){
 }
}
</script>


Don’t forget to assign the previously created Pageview Trigger:

track vimeo player with google tag manager

Checkpoint! Let’s see what we’ve created so far:

  • A Pageview Trigger which checks whether Vimeo video player is embedded in the web page (thanks to a Custom JavaScript variable).
  • A Vimeo Auto-Event Listener (as a Custom HTML tag) fires only when the aforementioned Pageview Trigger activates. Every time a Vimeo player interaction occurs, the listener will dispatch a Data Layer event with the following data:
    • Event Name: video (this value never changes)
    • eventCategory: Vimeo (this value never changes)
    • eventAction. Possible values: Played video, Paused video, 10%, 25%, 50%, 75%, 90%, or 100%.
    • eventLabel: [Video title] (this value is dynamically changed and depends on a video).

If you want to test this now, enable the Preview and Debug mode, refresh the page with the Vimeo player and try interacting with it. You should start seeing video events in the Preview mode’s left side.

 

Step 3. Create Data Layer Variables and a Custom Event Trigger

Google Tag Manager does not recognize Data Layer events or other data. So if you wish to transfer some information to other tools (e.g. Google Analytics), you need to “teach” GTM to fetch certain information (with the help of Data Layer Variables).

track vimeo player with google tag manager

After variables are configured, it’s time to create a Custom Event Trigger. Vimeo Auto-Event Listener sends all interactions as Data Layer events under the name of “video”.

 dataLayer.push({
   event: "video",
   eventCategory: "vimeo",
   eventAction: "vimeo play",
   eventLabel: video_title
 });

So the next thing you should do is to create a Custom Event Trigger which listens to ALL video events. Later, it will be assigned to Google Analytics Tag.

In GTM, go to Triggers > New > Custom Event and enter the following settings:

track vimeo player with google tag manager

 

Step 4. Create a Google Analytics Tag

Last but not least, Google Analytics. Now you need to send an event and pass the corresponding data with it. Create a new tag, select Universal Analytics as Tag Type, choose Event as Track Type, and enter all three Data Layer variables.

This means that every time a video event is created, a Google Analytics Event will be pushed to Google’s servers and all three variables will be dynamically replaced with the actual data.

If eventLabel equals to Video Title Lorem Ipsum, this exact value will be passed to Google Analytics.

Just make sure that you enter the GA settings Variable in its special dropdown (see the screenshot below).

track vimeo player with google tag manager

 

 

Step 5. Test test test

Don’t forget to test this entire configuration. Enable GTM Preview and Debug mode, go to a page with an embedded Vimeo player, and click Play. The next thing you should see is a video event in Preview and Debug mode’s event stream. Click it and see whether the Universal Analytics tag has fired.

track vimeo player with google tag manager

Also, don’t forget to check Google Analytics Real-time reports. Video events will appear in Realtime > Events reports. Within 24 hours (but usually much sooner), that event data will also appear in standard reports: Behavior > Events > Top Events.

 

The entire process in a nutshell

  • We created a Custom JS variable that returns true if the Vimeo player is embedded on a page.
  • Then we created a Pageview Trigger that checks whether Vimeo video player is embedded in the web page (thanks to a Custom JavaScript variable)
  • Then we created a Custom HTML tag (a Vimeo Auto-Event Listener). And it will fire on all pages where the Vimeo player is embedded. Important: even if you haven’t interacted with the player yet, that tag will still be fired.
  • Every time a Vimeo player interaction occurs, the listener will dispatch a Data Layer event with the following data:
    • Event Name: video (this value never changes)
    • eventCategory: Vimeo (this value never changes)
    • eventAction. Possible values: Played video, Paused video, 10%, 25%, 50%, 75%, 90%, or 100%.
    • eventLabel: [Video title] (this value is dynamically changed and depends on a video).
  • You have created 3 Data Layer Variables and one Custom Event Trigger (for the video event).
  • Finally, you created a Google Analytics tag that fires on the video event and will send the values of those 3 Data Layer Variables to Google Analytics.

 

Chapter 3. Six Google Tag Manager Video Tracking Recipes. All Unified.

Believe it or not, but the flow that I have described in the Vimeo player tracking section applies to a bunch of other non-Youtube video players:

  • HTML5 Video player (supports various players). A solution created by David Vallejo.
  • JW Player. A solution created by Pat Grady and David Vallejo.
  • Vidyard
  • Wistia. A solution created by the team of Bounteous.

Since most of the GTM Recipes are created by distinct authors, their naming convention is also diverse. That’s why I’ve spent some time and unified them (and included the 6th recipe – Youtube tracking with the built-in GTM functionality).

What does it mean? Well, if you use several types of video players on your website, video auto-event listeners will fire events following the same naming pattern. In other words, data in your Google Analytics event reports will be consistent. For example, Vimeo auto-event listener would fire this Data Layer event:

dataLayer.push({
 event: "video",
 eventCategory: "vimeo",
 eventAction: "vimeo video play",
 eventLabel: "video title - video id"
 });

While HTML5 video player would send different this.

dataLayer.push({
 event: "video",
 eventCategory: "video",
 eventAction: "play",
 eventLabel: video_url
 });

As a result, your event reports would be chaotic.

Anyway, here’s what data you’ll receive from each video auto-event listener:

Naming Convention Video Auto Event Listeners

P.S. Some video player listeners also send Resumed video and Video Error events.

P.P.S. JS Player listener will send the video file URL instead of the title if that video does not have a title.

Feel free to download any of these Google Tag Manager Recipes and start tracking video players in no time. Didn’t I tell you that Google Tag Manager Video Tracking was pretty easy?

 

HTML5 video Tracking Recipe for Google Tag Manager

HTML5 Video Tracking Recipe

Tracks interactions of the HTML5 video player (play, pause, etc.)
Get the recipe

JW Player Tracking Recipe for Google Tag Manager

JW Player Tracking Recipe

Tracks interactions of embedded JW player (play, pause, complete, etc.).
Get the recipe

Vidyard Listener Recipe for Google Tag Manager

Vidyard Tracking Recipe

Automatically tracks interactions of embedded Vidyard player (play, pause, etc.).
Get the recipe

Vimeo Recipe For Google Tag Manager

Vimeo Tracking Recipe

Tracks interactions of embedded Vimeo player (play, pause, etc.).
Get the recipe

Wistia Tracking Recipe for Google Tag Manager

Wistia Tracking Recipe

Automatically tracks interactions with embedded Wistia videos.
Get the recipe

Youtube Tracking Recipe Image

Youtube Tracking Recipe

Automatically tracks interactions with embedded YouTube video players on your site. This recipe uses the built-in Youtube video tracking functionality with GTM.
Get the recipe

One thing that I’ve noticed is that the HTML5 recipe doesn’t play well with others (well, at least some of them). Sometimes, it overtakes all interactions and other video listeners stop working. So make sure that HTML5 auto-event listener does not fire on the same page as JW player, etc. Everything else should be fine. If you notice any bugs, please let me know.

 

Video tracking with Google Tag Manager: Final words

When it comes to video tracking with Google Tag Manager, the first thing that probably comes to your mind is the tracking of embedded Youtube videos. Well, I don’t blame you, since this is the most popular video hosting platform in the world.

But if you are dealing with a non-youtube video player, that is still possible with some custom solutions.

In this blog post, I’ve explained how you can track both Youtube and non-youtube videos embedded on your site.

And to save you some time, I’ve also included a bunch of recipes that you can download, import, configure, and start tracking videos in minutes.

Just download any of them, import to your GTM account, and start tracking videos in a blink of an eye.

All these Google Tag Manager video tracking solutions follow the same principle, so once you master one, you’ll conquer all of them.

Julius Fedorovicius
In Google Tag Manager Tips
95 COMMENTS
CW
  • Sep 20 2017
  • Reply

Thanks for this! Downloaded the HTML5 container & implementation went smoothly, but when I track in GA in real-time, I'm seeing the following -
undefined (category) - undefined (action)
Video - Pause
Video - Play

The undefined numbers are skyrocketing while the actual 'Video' events remain pretty conservative. I'd still consider myself green when it comes to GTM, yes, but everything looks okay on the back end - references are in place for the event categories & such, but they're showing up as 'undefined' when I preview.

Thank you!

    Julius Fedorovicius
    • Sep 20 2017
    • Reply

    Hi,

    Maybe you have entered wrong keys in the Data Layer variable? Those keys are case sensitive. It means that variableName does not equal to variablename. You can share with me a link to your preview and debug mode so I could take a closer look.
    If you don't want to post it in public, shoot me an email to julius [at] analyticsmania.com.

    Cheers

      CW
      • Sep 20 2017
      • Reply

      Awesome - thanks for the prompt reply, Julius! Will email you separately.

    CW
    • Sep 21 2017
    • Reply

    UPDATE! Looks like this 'undefined' issue was probably caused by server maintenance, as everything appears to be firing properly today.

    The variables automatically populated in the format of 'eventLabel', but the reference in the tag is to 'gaEventLabel' - just make sure the variables are updated to match the script.

    Also, since our client's videos were uploaded with a random string of letters/numbers as the URL, I changed the event label to reference the page path that the video was being viewed on instead - that way we could clearly see which topic (& therefore, which video) was being viewed. Worked for our particular case, but may not work for everyone.

    Anyway, the HTML5 container is awesome & everyone should implement it. Thanks Julius!

Meg
  • Sep 26 2017
  • Reply

Thanks so much for all of this - I have managed to get embedded Vimeo videos sorted perfectly, however I am having trouble trying to figure out how to track Vimeo videos that load in a PopUp window ... I am not sure how to tell GTM to fire the tag after the pop up is opened ... do you have any information on how to do this that you could point me at?

    Julius Fedorovicius
    • Sep 26 2017
    • Reply

    Without knowing the full context, I'd say that maybe you should try to initiate the Vimeo listener when the certain button is clicked (which opened the video popup).

      Dan
      • Feb 3 2021
      • Reply

      I am curious if there is a tested solution for this as well.

Jannette
  • Nov 14 2017
  • Reply

This is great! One issue. When I'm in preview mode, I can see that the data layer is being populated with the appropriate video category, actions and label. I see it progress with actions for '50%', 'Paused video' and '100%', etc... However, when I look in Real Time events in GA, the only video category ever is 'Video' and the only action ever is "Play". I don't see the other actions - or even what they're defined as. It's strange is that the event action is 'Played video' - but in GA the event action is 'Play'. And the event category should be 'HTML5 Video' but in GA the event category is just 'Video'. Why the discrepancy? Appreciate your help!

    Julius Fed
    • Nov 14 2017
    • Reply

    Hey,

    1. Make sure that you have removed all filters from Real-time reports. They are displayed as blue tags (above the real-time reports)
    2. Make sure that you did not add another video listener (by accident).
    3. If you want me to do a further troubleshooting, send me an email to julius [at] analyticsmania.com with the following screenshots:
    a) Preview and Debug console (Data Layer Tab) once the video event is dispatched.
    b) Settings of Google Analytics event tag
    c) Settings of the trigger which fires that Google Analytics event tag.

Jackson Y
  • Nov 19 2017
  • Reply

Hi, I have implemented the vimeo tracking. It's working awesome.

Just a quick question:
I assume the Event Action (25%, 50%, 75%) are fired when they meet the threshold.. that means, if I want to find out how many people viewed 25%, I will have to take 50% deduct by 25% to get the actual viewers that viewed 25%, am I correct?

So its a compounding summation?

Is there an easier way that each percentage are unique to their own?

    Julius Fed
    • Nov 21 2017
    • Reply

    Hey,

    With this tracking, you cannot be sure that a visitor viewed 25% or 50% percent. It's possible that a user skipped video to 24%, then the event fired at 25% threshold. Without further hesitation, a visitor skipped to 49% percent and another event of 50% fired.

    As a result, you'll have two events in Google Analytics, 25% and 50%. But actually, in total, a person viewed only about 5 percent of a video. These listeners are not so smart to calculate the REAL duration of the watched video.

    I would not depend on a calculation you suggested, although I have nothing better to offer :)

    I believe that Google Tag Manager's built-in Youtube trigger now tracks how much a visitor viewed of your video.

      Jackson Y
      • Nov 21 2017
      • Reply

      Ah yes, but I am using Vimeo, so I am not so sure the YouTube listener will be tracking that.

      Oh speaking of the video skipping, it won't happen on my site with vimeo, because I have hid all the titles and timebar.

      Thanks for this great piece of article anyway!

Sameek
  • Feb 1 2018
  • Reply

So I tried implementing exactly the same example as mentioned above but the data layer is not being pushed on click of the video . The auto event listener tag is getting fired though. Can anyone please advice what could be the possible reason for the problem?

Thanks

    Julius Fed
    • Feb 1 2018
    • Reply

    Hi, which listener are you using and which video player do you wish to track (the web address of the video would be very helpful)? Usually, the videos are not tracked by listeners if that video appears in a popup.

Bronson O'Quinn
  • Feb 19 2018
  • Reply

This is great! Thank you so much.

The only issue I've encountered is that some of my client's HTML5 videos come from Facebook embedded iframes. Because these URLs don't have extensions, they return the Label "(not set)". Their markup doesn't have any useful identifiers, though, so I'm wondering if there's a way to just skip them and analyze them separately?

Here's an example of the markup to see what I mean:

    Julius Fed
    • Feb 19 2018
    • Reply

    You could create a trigger exclusion which does not fire the video event when the eventLabel = (not set), or something like that. This way you'd skip all video events which are from that strange player.

    Honestly, I have never tracked Facebook embedded videos before, so I cannot give you precise tips. Sorry.

Falk
  • Mar 9 2018
  • Reply

Could this also track the # of minutes a certain video was watched per month? And # of unique viewers per video per month? Could you point me in the right direction of how to get that configured with Google Analytics & VIMEO? (And if Vimeo BUSINESS would be required (which integrates with GA) or if VIMEO PRO would be enough.) Thanks!! :)

    Julius Fed
    • Mar 14 2018
    • Reply

    Hi, no idea what Vimeo PRO is so I cannot give you advice here.

    As for # of watched minutes, this would require more custom JavaScript and unfortunately, I'm not the right guy to write it (my JS skills are too limited). But here's the idea (maybe you'll find some developer who could help you):
    - A visitor watches a video. When the video completes, custom JavaScript could fire a dataLayer event with a custom metric, a number of watched minutes. Not custom dimension but custom metric. That event could be passed with GTM GA Event tag to Google Analytics (with that custom metric)
    - When a visitor watches a bit of some video and tries to leave the page, another custom JavaScript code should fire a data layer event, also with custom metric (number of minutes watched). That event should also be handled by GTA GA Event tag.

    As for a number of unique viewers per video, go to event reports in GA, click the youtube event and drill down till you reach Event Label (which is video title). In that report, you'll also see "Unique events" metric which is what you need. Also, don't forget to change the date to 30 days.

Falk
  • Mar 14 2018
  • Reply

Thank you very much for the detailed reply, Julius!
I found a programmer on Upwork who will/can implement what I am looking for.
I will pass this on as food for thought. Thanks again!!

Cee
  • Mar 27 2018
  • Reply

Thank you, very helpful. Does it track Brightcove video as well?

Thank you!
C

    Julius Fed
    • Apr 3 2018
    • Reply

    Hi, I haven't tried it. The best way for you to find out is to try by yourself :)

Becca
  • Apr 6 2018
  • Reply

Hi!

Relatively new to Google Tag Manager/GA and your blog has been an amazing help! Quick question for you - I installed the YouTube container from the link I copied below. THINK I set-up the proper goal in GA.

In preview mode, I see the tags firing properly on the site, but I don't see any corresponding event information in GA real-time view. Any thoughts I where I messed up? Do I need to set-up custom metrics to get the information?

Thank you!!

https://www.analyticsmania.com/google-tag-manager-recipes/youtube-built-in/

    Julius Fed
    • Apr 6 2018
    • Reply

    Hi, you probably inserted the Google Analytics Settings Variable in the GA Tracking ID field of the Google Analytics Tag. GA Settings Variable must be inserted ONLY in the GA Settings drop-down.

      Becca
      • Apr 7 2018
      • Reply

      Thank you! I really appreciate your reply.

Alessandro
  • Jul 26 2018
  • Reply

Hi, thanks!

I just found that, in the package for the JW Player, in order to differentiate the first Play event from the ones occurring after the user has paused the video, a small change has to be done in the code of the "cHTML - JW Player Listener".
In particular, in the function "eventToDataLayer (thisObject, eventType, eventInteraction)"
the "eventInteraction" parameter has to be pushed to the dataLayer instead of the "eventType".

Hope this can help, cheers

Profesor Berkeley
  • Aug 3 2018
  • Reply

Is it posible tracking Spotify videos? How I do that?
Could you direct me? throw me a little light about it? Thank you!

    Julius
    • Aug 3 2018
    • Reply

    I never tried it. Import HTML5 video tracking recipe and give it a try. Maybe it will work.

Alexandre Sattamini
  • Sep 21 2018
  • Reply

Hello Julius

I have a little issue with this implementation. It did work just fine in the beginning. But then I realized something:

My website has an online course platform where the user can watch different videos from one single discipline. The thing is that the URL does not change. Videos are accessed through clicks that do not change de URL. It is like a dynamic JavaScript. So I noticed the first video play is captured, but not the following ones.

Can you help with any insight about that?

    Julius Fedorovicius
    • Sep 24 2018
    • Reply

    Hey, here's an idea (but I haven't properly tried it so beware and test it properly):
    - Use Lunametrics custom youtube video listener.
    - Fire it every time a video player appears on the screen (with help of Element Visibility trigger).

    In theory, every time a Lunametrics code is fired, it should check the page for new players available. However, take this with a grain of salt and test it properly.

      Alexandre Sattamini
      • Sep 24 2018
      • Reply

      Hey Julius. Thanks a lot. I will try it.

      In fact I got some conflict between the vimeo javascript tag (custom js) with the site’s code. Users reported some autoplay issues

      But I know this is normal with custom javascript tags

      I will try the option you pointed

Tanguy
  • Nov 7 2018
  • Reply

Hi!
I just implemented the YouTube recipe on a WordPress websites. It works fine on classic content, but popup videos loaded through the Elementor page builder won't be tracked. Do you have an idea how I could solve this?

    Tanguy
    • Nov 9 2018
    • Reply

    I added the the visibility trigger, which works fine for this. However the YouTube Video trigger won't fire after this one. Any tips to connect both?

      Julius Fedorovicius
      • Nov 11 2018
      • Reply

      You don't need to connect two triggers (I mean Youtube trigger and the Visibility trigger). First of all, try to implement the Lunametrics solution https://www.bounteous.com/insights/2015/05/11/updated-youtube-tracking-google-analytics-gtm?ns=l. Maybe it will work out of the box.

      If it does not, then use the Visibility Trigger to fire Lunametrics' Youtube Tracking Listener. Meaning that once the popup appears, then launch the Youtube Listener (Custom HTML tag). That Listener will start listening to Youtube Player's interactions and will send the interactions to the Data Layer. After that, create the Custom Event trigger to catch those Youtube interactions.

        Dan
        • Feb 3 2021
        • Reply

        Are you saying regardless of whether the video is in a modal/popup or embedded on the page it will be tracked? All that needs to be changed would be using the Element Visibility trigger instead of a the
        Page View - DOM Ready trigger?

Tanguy
  • Dec 13 2018
  • Reply

Hi Julius. It works indeed, almost out of the box. Just had to add the percentages to the Custom triggering conditions (after Play|Pause|Watch to End) for them to appear in GA.
I spend quite some time on this, but to be honest, I never really understood how these tags work with each other. One thing I got, though, is that these work with my popups... And that I could even replace the Custom Event trigger with the native YouTube Video trigger.

The only real drawback I see in this method is that it won't retrieve the video title for label, which would be much more useful than the Url.

Leslie
  • Jan 1 2019
  • Reply

Hello there! Thank you for your awesome work! I was curious, is there a recipe that you recommend or have for "Flowplayer" Thank you!

    Julius Fedorovicius
    • Jan 2 2019
    • Reply

    I haven't tried to track that player. Have you tried the HTML5 video recipe?

      Leslie
      • Jan 12 2019
      • Reply

      I'm working to set that up. But I'm asking about flowplayer because we have several players on our site and I want to track all of them including flowplayer.

        leslie
        • Jan 14 2019
        • Reply

        hello again! now I see what you were asking. HTML5 recipe handles flowplayer too. awesome! it seems to be working :)

Simon
  • Jan 23 2019
  • Reply

Hi Julius,
I've implemented the HTML5 recipe on a clients site, however they have 2 videos present and I only would like to track one of them. One is in the header and on loop, so doesn't need tracking.

The one I need tracking is near the bottom of the page - https://www.forzafinance.co.uk

GTM is firing for both, but how do I explictly state it to only push play data to GA for the 2nd video?

Thanks in advance.
Simon

    Julius Fedorovicius
    • Feb 1 2019
    • Reply

    Hey, Simon. With every dataLayer.push there is a variable called eventLabel. You can use it to distinguish which video is playing.

    That header video's eventLabel is "forza-vid-web-2.mp4".

    So you could update your Custom Event trigger to ignore those events that contain "forza-vid-web-2.mp4" eventLabel belonging to that header video.

Jana
  • Jan 28 2019
  • Reply

Hi Julius, thank you for sharing your knowledge. It helped me a lot. I have a question regarding the interpretation of the data being sent to GA. I am struggling to understand which number indicates the amount of users actually watching the video (no matter the lenght)? Because it is my unterstanding that one user who constantly pauses and jumps further in the timeline can trigger multiple actions like 25% and paused video.

Or do i have to elimiate all the other actions in the javascript part in ordner to track unique amount of users who came in contact with the video?

    Julius Fedorovicius
    • Jan 28 2019
    • Reply

    Hey. To answer that question, create an advanced segment in GA and include sessions with at least one "video play" (or whatever you called those actions). Then (with that segment selected) go to Audience > Overview and you'll see the number of all users that are included in that segment. That's the number of users who have played the video (regardless of the watched length).

      Jana
      • Jan 28 2019
      • Reply

      Thank you so much!

Santiago
  • Mar 28 2019
  • Reply

Hi,
I also had the GA variable inserted both on the drop down and on the overwrite. I unselected overwrite and now it's tracking in google analytics (before I could see the events in the datalayer but not in google analytics). I also was using duracell's GTM plugin and had selected the media event's so I had 2 listeners running at the same time.
Now it works. Thanks very much for this!

tania
  • Jul 15 2019
  • Reply

You rock Julius! Thanks so much!

danny
  • Oct 16 2019
  • Reply

hello Julius, i have 2 videos in one page. the first video is in html5 and second video is youtube embed. i'm using your html5 video container. and it only tracks the youtube video events. why can't it track the html5 video?

    Julius Fedorovicius
    • Oct 23 2019
    • Reply

    Maybe that video player is very much modified, therefore, the HTML5 listener cannot spot it. It's difficult to give you advice without knowing more information.

Tanguy
  • Jun 8 2020
  • Reply

Hi and thanks for this very useful method.

I've got a Vimeo video embed on my homepage (WP using Elementor builder), I followed the steps closely but I can't make it work.
In debug mode the cHTML - Vimeo Listener Tag fires properly but nothing happens in the events list when I interact with the video.

Any clue?
Thanks!

    Julius Fedorovicius
    • Jun 8 2020
    • Reply

    With that amount of information you provided, not really :)

Chris
  • Jun 26 2020
  • Reply

How would you set up a custom report in GA to get the best insights? Now all the values from Event action(look-up table) just split up the data for the different videos.
Event label - Video titel + page path
Event action - look-up table

Thank you!!

    Julius Fedorovicius
    • Jun 26 2020
    • Reply

    Depends on your question/hypothesis. What question do you want to answer? An example of a question might be: do visitors who have watched the video tend more to convert? In that case, you can create an advanced segment where a visitor watched any video and then converted. Another segment might be all users. Is that advanced segment performing better?
    By having that segment in mind, you can also check video titles. Which video titles are appearing more often in the session of "converted visitors".

    This might be one of the examples.

    First, you raise a question. Then you try to answer that with the data you have. Simply looking at a certain report without having anything particular in mind will get you nowhere (at least in most cases from my experience)

      Chris
      • Jun 26 2020
      • Reply

      Thanks, Ok now I understand how to use the information I receive.

Ig
  • Jun 30 2020
  • Reply

Hi Julius,
I've implemented the HTML5 recipe, everything is working fine on desktop. But it doesn't work on Android, there is now any events on Google analytics. Any suggestions?
Thank you,
Ig

Andy King
  • Jul 22 2020
  • Reply

Hi Julius
Amazing content - thank you so much. Ive got the Vimeo recipe set up and working. I now need to run it on a password protected video. Is that possible do you think? I'm currently struggling at the end of step 2 to implement the listener. When there is no password protection I can see the 'Video' Event in the debug menu (and the other tracking steps work), but when the video is password protected this event doesn't fire. Is there a change you know about that I need to make?
Thanks in advance!!

Steven
  • Jul 24 2020
  • Reply

Hi Juluis,

I work for a church that has started using Living as One (probably a more niche video host that's geared towards churches) I was wondering if you knew of anyone building recipes for live stream videos that might work for tracking that? I've tried all the containers here to see if they would work and none did.

    Julius
    • Jul 25 2020
    • Reply

    Hi, live stream videos work in a different way and ready made listeners don't work - just as you have found out.

    You would need to cooperate with a developer here and he/she should check if it is technically possible to track those players at all.

Al
  • Aug 12 2020
  • Reply

hi julius,

is there any way to create automated email triggers linked to video progress? I.e. if a subscriber only watched 25%, they get a certain email but 50% gets a different one, so on so forth? or do i need to use a completely different method to do that? basically i am trying to create an automated marketing system that tracks individual behaviour on consuming my videos so my response is appropriate not just one-ring-to-rule-them-all method. and not break the bank doing it. thanks in advance!

    Julius
    • Aug 12 2020
    • Reply

    I would not recommend using GTM for that (GTM can be blocked by ad blockers). Also, you would need to do some additional coding or integrate some email marketing platform. I would be looking for some other solution for this and, most likely, cooperate with a developer to integrate it.

Laura
  • Sep 15 2020
  • Reply

Hi!! I can notice in my DataStudio report that the event was triggered when the person viewed 10% of the video, then another trigger for 25% progress, then another one at 50% and so on... all of these "events" came from the same person (because, of course, the person watched the video until the end and all my progress triggers were fired.

How do I make GTM tell Analytics to only count one trigger once the final action as happened? I mean: if the person watched it completely, Analytics Label should say: watched (or finished). But, on the contrary, I am counting multiple events for the same person: when they START watching the video, when they make multiple progress and when they have finished watching the video. How do I fix this? I am getting heaps of events in my data now.

Thanks,
Laura

    Julius Fedorovicius
    • Sep 15 2020
    • Reply

    Update your custom event trigger. Include an additional condition where the action is related just to a completed video. The exact settings depend on the video player.

    Or you can create a filter in Data Studio to include only those events that are related to the "video completed" event.

Vu Quang Tuyen
  • Oct 5 2020
  • Reply

Thanks alot Julius, I want to create custom event FB Pixel - audiences consumption video Vimeo / Youtube. So Do you have guideline for this. ?

Guy Levine
  • Nov 4 2020
  • Reply

Thanks - Great Article. The only bit which confused me at the end is when setting up the the UA tag in Step 4 for Youtube you have listed 3 Variables which have not been set up during your steps. I picked up setting the action as the lookup table - Would the category not just be hard written as say Video? Where would eventCatagory come from?

Vasavdutta Purohit
  • Nov 20 2020
  • Reply

Hi Julius,

Is there a way to track a .mp4 video embedded in an iframe? For instance:

Thanks,
Vasav

Rob Rose
  • Dec 1 2020
  • Reply

Hi Julius,
I have a site in DEVELOPMENT for a client that behave similarly to an SPA. There is a nav menu that dynamically loads new content and they each contain a Vimeo. The problem is the page isn't reloading. Its just the content.

Long story short there are multiple Vimeo videos embedded.
All the Vimeo tracking scripts from you, CardinalPath, Bounteous, etc. work but only on first page load and first video that you interact with.

After that all of the tracking ceases.

Is there anything that can be modified in your script to solve for a situation like this?

Thanks,
Rob

Tammy Allen
  • Dec 14 2020
  • Reply

Hi Julius,

Really appreciate this guide. I followed your YouTube steps but did not yield the desired results...instead of seeing 'YouTube Video' in the side panel, all I see is 'Click' with no tags fired. Any insight as to why?

Tammy

    Julius
    • Dec 14 2020
    • Reply

    Hi, read this https://www.analyticsmania.com/post/youtube-tracking-google-tag-manager-solved/

Matt
  • Dec 23 2020
  • Reply

This is just what I was looking for! When I preview in debug mode the script works as it should but my Hubspot Lead gen form doesn't show up? Could this event listener block a form from being shown? HOw would I fix? I sent an email to you as well. Thanks.

matt
  • Dec 26 2020
  • Reply

Will this work even if a user is on the mobile version of the site?

Tristan
  • Jan 6 2021
  • Reply

Hey Julius,

I've tried setting this up for a vimeo video on a clients website and I've got to the testing stage in Tag Manager. Whenever I interact eg play or pause the video, the Analytics Tag doesn't fire when in Debug mode. The video is in an iframe - could this be causing any issues, hence why I'm not seeing the GA tag fire?

Thanks!

Sandra
  • Jan 7 2021
  • Reply

How would I do Chapter 1, Step 4 (video progress tracking) with Google Analytics 4?

Dan
  • Feb 3 2021
  • Reply

Are you saying regardless of whether the video is in a modal/popup or embedded on the page it will be tracked? All that needs to be changed would be using the Element Visibility trigger instead of a the
Page View - DOM Ready trigger?

Brittney
  • Feb 8 2021
  • Reply

Hello,

I was thrilled to find the HTML5 video tracking GTM json. I've implemented in GTM and it works in preview mode, however, it does not work once deployed. There is nothing in realtime for videos and I've even waited a few days and see no history of video plays.

What could be going wrong with this?

    Julius
    • Feb 8 2021
    • Reply

    Hi, maybe you will find some solutions here https://www.analyticsmania.com/post/google-analytics-real-time-reports-not-working/

      Brittney Wilson
      • Feb 9 2021
      • Reply

      Julius,

      You are amazing.This guide had the exact answer.

      In the "Tracking ID" field I was trying to use a variable that was the tracking ID. Once I copied the tracking ID into that field directly, magically it started working.

      I still don't quite understand how it seemed to work fine in preview, as I don't see any changes in the preview.

      Thank you for your assitance.

sam
  • Feb 15 2021
  • Reply

Hello Julius,

I have implemented this solution in the past with no problems, however I am running into the problem with the custom event not firing on 'video' when working with GA4. Have you ran into this problem before? both the vimeo tags were running on a iframe on both domains - the only difference is one is using GA, and one is using GA4.

charles
  • Mar 3 2021
  • Reply

Hi, do you have any guide on how to setup Google Tag Manager for Uscreen videos?

    Julius
    • Mar 3 2021
    • Reply

    No

Molly Dupont
  • Mar 6 2021
  • Reply

Charles, for my client's Uscreen account I just followed along their help center post and video that they have in that post, and it seems to be working fine. If the link doesn't end up published, just search for Uscreen Help center and then for GTM article :) I know there are some limitations but I know their team is constantly updating stuff.

https://help.uscreen.tv/en/articles/4316237-google-tag-manager-integration

Jonathan Isernhagen
  • Mar 18 2021
  • Reply

Do you (or anyone) know whether GTM can be set to track consumption of videos which are set "private" in Vimeo?

Salih Kp
  • Apr 22 2021
  • Reply

Hi Julius.

I was trying to track Wistia video player interaction using the recipe after imported it to my GTM container. By its default configuration, it was not listening to any wistia player interaction. But Then I changed its default trigger configuration from 'Pageview - Wistia Player is Present' (It is DOM ready- configured to some DOM ready events with custom JavaScript variable) to All Pageview trigger. after that it is started to listen the interaction.

Thanks

    Salih Kp
    • Apr 22 2021
    • Reply

    But to not get the GA reports as messy when the website has multiple video players, what to do here?

Daphne
  • Aug 19 2021
  • Reply

Hi, thanks for your amazing help!
I implemented the HTML5 tracking and everything works fine, but..
When I play a video to the end, before the 100% I always get a paused event, although I did not press pause. I tried it on a test and on the real page, but I get the same problem. The paused and 100% event occure at the same time in the preview mode summary.

Any suggestions? Thanks a lot!!

    G420
    • May 13 2022
    • Reply

    I an having the same issue with FluidPlayer

Moghise
  • Dec 31 2021
  • Reply

Hello.
The video I wanted was uploaded to another video sharing site.
How can I track it in Tag Manager?
The html5 and youtube method is not practical for me.

    Julius Fedorovicius
    • Jan 4 2022
    • Reply

    Try to find out what is the provider of that other site. Then google is they support GTM tracking. If not, you are out of luck.

Brendan Butler
  • Jan 18 2022
  • Reply

Hi Julius,

Thanks for the recipes and tips. I had a question. We use the built in vimeo integration to track all our vimeo videos on episerver. Basically you add your tracking code into the vimeo account. I have now been tasked with tracking a self hosted HTML 5 video. Will the recipe for html you have posted play well with our vimeo implementation? I ask as analytics and reporting are essential to the business so I can't make a mistake. Have you ever seen it cause a problem with vimeo and if so any advice to avoid them?

    Julius Fedorovicius
    • Jan 26 2022
    • Reply

    Never tried this. The best way for you to find out is to try and see what happens.

Brendan Butler
  • Jan 18 2022
  • Reply

Hi Julius,

Big fan. I use the vimeo integration where you place your analytics ID in Vimeo to track the majority of our videos on episerver. I have now been tasked with tracking a HTML 5 video and I was wondering if your html 5 recipe will play nicely with the vimeo integration. Have you ever seen the two conflict and if so what would your advice be. I only have one HTML 5 video to track so I could limit it to that page. But it also has a Vimeo video on it. Analytics and reporting are extremely important to the business so it's essential no mistakes are made.

Miguel
  • Jan 19 2022
  • Reply

Hello! I am trying to track video with Vimeo. I test all the steps from your vimeo recipe and it works fine in preview mode but when i publish the changes it does not work. There is no events in the data layer or in GA. I am trying to find the issue but cant find a solution. Im using GA Universal in preview mode the data goes to GA but in the published environment it does not :( thank you for everything!

Miguel
  • Jan 19 2022
  • Reply

I am trying to track video with Vimeo. I test all the steps from your vimeo recipe and it works fine in preview mode but when i publish the changes it does not work. There is no events in the data layer or in GA. I am trying to find the issue but cant find a solution. Im using GA Universal in preview mode the data goes to GA but in the published environment it does not :( thank you for your help!

    Miguel
    • Jan 19 2022
    • Reply

    I am just adding an extra comment to get the notifications from this section :)

Eileen
  • Mar 28 2022
  • Reply

This might be a dumb question, but I'm relatively new with GTM. I'm trying to track an HTML5 video that is running across different pages on our website. Would I have to create a tag for each page, or is there a way to track it with one tag? The video is hosted on our website.

    Julius Fedorovicius
    • Apr 13 2022
    • Reply

    No need to create separate tags for each video

Rachel F
  • Jun 2 2022
  • Reply

Hello,

I'm new to GA4 and GTM with applying tags. I created the YouTube video trigger on the video_{{Video Status}} but on my site I have 2 videos. I only want to track one of them where the video title has a consistent title even though it could be switched out monthly.

There are 3 words in that title where I want to create this parameter for the video title in my GA4 Event for the YouTube video trigger. Do I have to add a parameter in my GA4 Event and somehow have a value for the video title that can say "contains" and then the words that I want it to find? Any help would be appreciated on how to walk through this. Thank you.

Leave a comment Cancel reply

Your email address will not be published. Required fields are marked *

 

Hi, I'm Julius Fedorovicius and I'm here to help you learn Google Tag Manager and Google Analytics. Join thousands of other digital marketers and digital analysts in this exciting journey. Read more
Analytics Mania
  • Google Tag Manager Courses
  • Google Tag Manager Recipes
  • Google Tag Manager Resources
  • Google Tag Manager Community
  • Login to courses
Follow Analytics Mania
  • Subscribe to newsletter
Recent Posts
  • Introduction to Google Tag Manager Server-side Tagging
  • 3 Ways to Pull Data from Data Layer with Google Tag Manager
  • Cannot See the Google Tag Manager Option in Google Ads Conversion?
Analytics Mania - Google Tag Manager and Google Analytics Blog | Privacy Policy
Manage Cookie Settings