Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jwplayer Video tracking using GTM

First of all I am new to GTM. I am trying to implement GTM video tracking on one of our site which is using JW player.

I have followed couple of articles as follows:

https://www.thyngster.com/jwplayer-video-tracking-using-google-tag-manager/

In the above one I was clueless what to do after putting the tag code as I couldn't find how to trigger that.

I also followed this link, but it didn't work either:

http://ecommppc.com/2014/11/30/track-jw-player-videos-on-gtm/

like image 912
Arihant Godha Avatar asked Aug 05 '15 16:08

Arihant Godha


People also ask

How do I upload a video to Google tracking?

The easiest way to open a video in a new tab is to simply drag and drop it onto the Tracker toolbar. You can also use the Open button or File|Open File menu item. To import a video into an existing tab, drag and drop it into the main video view or use the Video|Import, Video|Replace or File|Import|Video menu item.

How do I track video in Google Analytics?

So, to start tracking your video views, you'll need to set up a custom metric in your Analytics. To do that, go to the “Admin” tab in your Analytics and locate the “Property” options. When you find the right menu, scroll down and select the “Custom Metrics” option under the “Custom Definitions” tab.

Can GTM track iframe?

You can track iframe interactions by sending a Javascript call called postMessage from the iframe to the parent frame. The parent frame listens to the call with Google Tag Manager, then forwards it to your marketing tools.


1 Answers

I believe I know what is going on. The code/tag, trigger, and variable he has set up in the tutorial is only what pushes the information to the dataLayer itself. The final step would be to add another variable, a tag to capture it, and a trigger to send it.

The variable you need is the dataLayer variable (Available in GTM under Variables > User Defined Variables > New > Data Layer Variable). You then give it the name of the variable in the dataLayer you want it to capture. Specifically, any of the variables in the dataLayer.push action (i.e. video_url, duration, etc).

The trigger to use in this case is the Custom Event trigger. This trigger will specifically wait for an object to be pushed to the dataLayer with the "event" variable in it. In this case, you need a trigger to wait for an event with the name "video". You can also add filters, i.e. this trigger will only fire on specific URLs, or when other conditions are true.

Finally, you need another GA Universal Analytics tag, set up to track events i.e. Track Type: Event. In this tag, set the trigger to the Custom Event trigger you made earlier, and then click into "Configure Tag". Under "More Settings", click "Add Custom Dimension". Make sure the index you are using to send it to Google Analytics is not in use in your property already; other than that it doesn't matter what index you choose. Finally, add the variable name in the "Dimension Value" field in this format: {{video_url}}. Instead of "video_url", include the name of the dataLayer Variable you created earlier.

This should get GTM to grab the variable out of the dataLayer and push it to Google Analytics every time that "event" variable is seen in the dataLayer object.

Hope that helps!

like image 126
andre622 Avatar answered Sep 18 '22 21:09

andre622