Streaming live at 10am (PST)

Help with Video Tracking using Google Tag Manger

My goal is to track embedded, dynamically loaded YouTube videos using Google Tag Manger, and track interactions as events in Google Analytics.

Here’s what I’ve tried thus far:

  • LunaMetric’s “YouTube Video Tracking for GTM” container imported into GTM, and updated with the appropriate GA Tracking ID

  • Simo Ahava’s modified custom HTML tag for LunaMetric’s solution referenced above

  • native support for YouTube video tracking in GTM, using Simo Ahava’s guide (“The YouTube Video Trigger in Google Tag Manager”)

None of these solutions resulted in tags being fired, and no events related to video interactions were recorded in GA (tested independently, using Preview Mode in GTM). All other tracking tags related to link clicks, form submissions, etc. are functioning properly.

Per Embedly’s analytics support documentation, platform.js was installed on page, and both methods provided were tested.

After going into the Chrome Developer Console, I noticed the following error:

I found a thread on StackOverflow discussing this error as it pertains to YouTube videos, and a common solution seemed to be changing the URL for the target origin from https to http. I did exactly that (using Designer > Video Settings > URL), but I’m still getting the same error.

I’m afraid that I’ve fallen down a rabbit hole, and don’t know how to get out. Support documentation from Embedly is sparse, and their customer support team has been non-responsive thus far.

Any helpful tips or insights are greatly appreciated!

tl/dr: How do you track embedded, dynamically loaded videos in Webflow using Google Tag Manger?

Hi, I’m having the same issue but not using Embedly, just Vimeo’s native embed. Did you figure out what the issue is? I wonder if it’s a Webflow conflict?

Hi @scottfasser, we ended up using an HTML Embed element, and then pasting in the embed code directly from YouTube into the HTML Embed Code Editor. This enabled tracking of YouTube videos using GTM.

If I remember correctly, the tracking issue was due to nested i-frames, and using the HTML Embed element only wrapped the video in a single i-frame, which allowed the tag to fire.

I haven’t tested this with Vimeo videos, but it’s worth a shot.

Thank you! I think that fixed it - looks like GTM is picking up the tags now in preview. Whew!

Scott Fasser
VP of Marketing - Sigma IQ

scott@sigmaiq.com
206-713-4185
@scottfasser

Machine Learning Solutions to Empower Finance & Accounting Teams.

1 Like