Brief Intro
The implementation of video analytics of embedded players like YouTube, Vimeo, and open-source Video.js or HTML5 is considered to be tricky. However there are really good resources across the internet that I found to be really helpful.
I will concentrate on Google Analytics (GA) implementation using Google Tag Manager (GTM), as this measurement stack is the most popular.
You may find it handy to have a look at my previous post on scoping of the video measurement framework, as this one covers the resources needed for video analytics implementation.
8 Best Resources on How to Implement Video Analytics
Without further ado, let’s jump to the resources!
YouTube
(1) The official documentation gives you the general information about the implementation and it is always a good point to start.
However there is a much more comprehensive tutorial on how to do it. Check out (2) Simo Ahava’s post on this topic. Simo updated his post in April 2020 and explained how lazy-loaded videos can be tracked with this code. This blog is bookmarked in my browser from 2016 💛 The best of the best!
Vimeo
(3) The Vimeo official documentation on lazy-loaded videos suggests using setTimeout
function for together with window.__vimeoRefresh()
function that would refresh videos within an embedded iframe, so that the video listener can be hooked in that way. I would say this is not ideal from a web performance perspective. There must be a better way to do it - please refer to a couple of words on lazy-loaded videos section in this post.
Another useful resource is the article on (4) Vimeo implementation from AnalyticsHelp.io from 2020 using (5) Lunametrics Vimeo listener.
Video.js and HTML5 videos
Although (6) this blog post on David Vallejo’s blog on tracking HTML5 videos is from 2014 there will be an update soon. The updated code in 2020 is already on (7) David’s GitHub.
Brightcove
Brightcove updated their (8) official plugin for video tracking with the Video Cloud player in version 6.36.5+ using GTM and GA in late 2019, so it is quite recent. They have one for Tealium iQ tag manager too!
Fantastic Bonus Resource
Julius Fedorovicius from Analytics Mania created an amazing collection of the different video tracking codes on his blog - including video players like JW Player, Vidyard, Wistia and Vimeo - in (BONUS) one unified solution. Have a look!. Updated in November 2019.
A couple of words on lazy-loaded videos
It is always a great idea to speak to your developers over a coffee or something stronger 😉 on how they embed lazy-loaded videos. With clear instructions from them you should be able to pin-point the exact event - on lazy load, and use this event to activate your video listener code. This approach works for both Google Analytics and Adobe Analytics stacks.
Definitely I would not recommend using setTimeout
function as this has an impact on the site performance. If you work on embedded Vimeo iframes, you can try the solution suggested in the official documentation but be aware of the downsize of page speed.
Summary
Would you like to find out more or do you have some questions or feedback? How about implementation resources for different analytics stacks and tag managers? Please feel free to leave comments under this post or contact me directly.
If you like this post, and found it useful, please share.
Thanks for reading and sharing the post!
Happy measuring!