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?