Is there a Variable to get the Video Title in Tag Manager?


(James) #1

Does anyone know the exact variable to grab an embedded video when played on a wordpress website?

Or is there a java script I could possibly run?

So far I have these settings which works to show a video in the post being played but not the title.

Tracking Type -> Event
Event Category -> Videos
Event Action -> Play
Event Name -> Nothing I have tried so far worked.
Event Value -> 30

Any help would be appreciated.
Thank you for the time. J.


(Ronan Chardonneau) #2

Hi James,
that would be my pleasure to help you :slight_smile:. I am not 100% sure of the answer, I guess it depends of the video player, could you please either tell me the video player or the web page in which the video is included?

Thanks,


(James) #3

Hi Ronan, Thank you for getting back with me so soon.

I embed Youtube videos in my post.

Here is a common example of a post.

A Labor of Love in Business and Blog Policy Statement
https://pocbooks.com/a-labor-of-love-in-business-and-blog-policy-statement/

As you can see, I have at least 2 or more Youtube videos in my posts.

It would sure be nice to know the title of the ones that are bing played by using the Matomo Tag Manager. Any help would be appreciated.

-Kind regards James


#4

Just fyi: Media Analytics does this out of the box. Media Analytics - Matomo Plugins Marketplace


(Ronan Chardonneau) #5

Thanks for the example, I clearly identify your needs now. It is feasible but not trivial I would say.
In fact as it is an iframe, the interaction is not happening on the page, so we need to discuss with YouTube API to get the data from it.
It is basically some code you need to copy and paste but I have not the expertise to audit it.
I did not try it yet, but it should work fine if you follow this tutorial and adapt it: YouTube Tracking In Google Analytics & Google Tag Manager


(James) #6

You are welcome Ronan. I will take your advice and let you know how it turns out.
For years I have used Google Tag Manager, but as you can see, I now want to localize all my website’s data stats.

Again, thank you and kind regards, James


(Ronan Chardonneau) #7

I think it is going to work out. Some years ago I did it with 7tag and it works so no reason that it won’t with Matomo Tag Manager. My only concern is that I do not know what the code from lunametrics is doing but I guess it should be fine.