4 Replies Latest reply on Dec 3, 2015 5:29 PM by Sanford Whiteman

    Where to put the Google Tag Manager code on a Marketo Landing Page Template?

      We are using Google Tag Manager to organize and maintain any 3rd party scripts that need to go on our website and on our Marketo Landing pages. I am trying to figure out what the best option is for placement for the GTM code in a Marketo Landing Page Template. I have found a number of articles on how to put the Marketo Munchkin in a GTM, but nothing addressing best placement in a Marketo LP Template. What is the best practice, where do you put the Google Tag Manager code snippet in your Marketo Landing Page Templates?


      GTM suggests right after the opening <body> tag, which would put it about here in our template:


      <body id="bodyId" class="mktEditable" align="center">

      <!-- Google Tag Manager -->

      <noscript><iframe src="//www.googletagmanager.com/ns.html?id=YOUR GTM CONTAINER ID"

      height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>


      new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],



      })(window,document,'script','dataLayer','YOUR GTM CONTAINER ID');</script>

      <!-- End Google Tag Manager -->

      <div id="outerWrapDiv">

      <div id="headerWrap">

      <div id="mktHeader" class="mktEditable">

        <!-- Logo and Header -->


      But I have also heard some people saying to put it in the area where you would normally put the GA code snippet which would be just above the closing </body> tag:





      <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">


      <script type="text/javascript">

      _uacct = "YOURCODE";