Tracking Marketo Events in Google Tag Manager

Lauren_Bennett1
Level 1

Tracking Marketo Events in Google Tag Manager

Looking to add Marketo event tracking for video plays and PDF downloads through Google Tag Manager - What is the best way to go about this? Do we add custom data events or custom objects?

1 REPLY 1
SanfordWhiteman
Level 10 - Community Moderator

Re: Tracking Marketo Events in Google Tag Manager

A PDF download -- if you mean direct navigation to a PDF from a clicked link in an email -- cannot be tracked, period. You must use a redirector LP: https://blog.teknkl.com/stop-using-direct-download-links-unless-you-like-losing-tracking/.  If you mean just a click on a web page that happens to lead to a PDF, that's tracked automatically, nothing custom is necessary.

Video play/pause tracking requires custom code (you didn't say what video platform) that you can find by searching the Nation.

In both cases, you need to make sure the Munchkin bootstrapper (munchkin.js) is loaded before you add custom code that depends on Munchkin. This means your custom code should be loaded only after the initial Munchkin script has fired its onload event.

Using GTM to load Munchkin is not recommended because avoiding race conditions (load order errors) is difficult for non-technical users. If you understand GTM tag sequencing et al. you should not have a problem, but I still advise against it.