While working on a recent project, I discovered one reason why Google Tag Manager may not be tracking your YouTube video event. Being new to Google Tag Manager and Video Tracking, I assumed the reason that playing the video on my page wasn’t triggering a video event was due to a newbie mistake. After Googling for a while, I read a couple of posts where it was mentioned that this could be due to the way the video is embedded in the page. The light bulb went off!
I was using InfusionSoft’s Landing Page Builder and had inserted a video element in the page. I had pasted the YouTube video URL into the field, but after saving, it had transformed the URL. To get around this, I added an HTML element into the page and pasted the YouTube embed code for the video. Saved it, tested, and success! Google Tag Manager triggered the video event! Using an HTML element allows you control over exactly how the video is embedded.
Another plus of embedding the video this way is that I can append “?rel=0” to the video URL so that when my client’s video stops playing, the suggested videos are other videos on her channel and not just random videos from YouTube.