1 Reply Latest reply on May 23, 2017 1:05 PM by Sanford Whiteman

    Error message on deploying Munchkin via GTM

    Niklas Kubasek

      I'm setting up my Marketo instance and working on getting the Munchkin code onto my site. I'd like to use Google Tag Manager to deploy the Asynchronous option. I've followed the instruction at http://developers.marketo.com/blog/integrating-munchkin-with-google-tag-manager/

      Once deployed, I see data being collected as expected on the marketo side, but am getting an unexpected error on my site:

      Uncaught TypeError: Cannot read property 'init' of undefined

           at HTLMScriptElement.m (munckin.js:6)

      m @ munchkin.js:6

      Don't see any other mentions of similar errors so curious if anyone has ideas on how I might be able to resolve the error to redeploy the munchkin tag without throwing errors on site.



        • Re: Error message on deploying Munchkin via GTM
          Sanford Whiteman

          If activities are still being logged despite the error, you probably have a second call to Munchkin.init() in your main page code (without loading the Munchkin bootstrapper) as well as in the GTM setup.


          Note I don't recommend using GTM for Munchkin. It will lead to lost activities under some circumstances, as a natural consequence of moving to an all-async architecture without later-model tech to back it up.