Skip to main content
Jul 31, 2017 2:24 AM UTC
Solved

How can I implement Google Tag Manager (GTM) into Marketo landing pages?

Hi there! Just wanting to ask what the best process is for implementing GTM code into my Marketo landing pages? I assume this would be just like any standard implementation (e.g. place the code at the top of the <body> tags within the landing page template (Guided landing pages)).

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
SanfordWhiteman
SanfordWhitemanAccepted solution
User Group Leader
Jul 31, 2017 3:02 AM UTC

Yes, if it's a global script, you'd hard-code it in the template.

If there's a need for some kind of conditional include, you can use a mktoBoolean.

11 replies

SanfordWhiteman
User Group Leader
SanfordWhitemanUser Group LeaderAccepted solution
User Group Leader
Jul 31, 2017 3:02 AM UTC

Yes, if it's a global script, you'd hard-code it in the template.

If there's a need for some kind of conditional include, you can use a mktoBoolean.

Translate
Josh_Hill13
Level 10
Jul 31, 2017 3:59 PM UTC

There are also several tips on the Forums and in previous Summits to use Folder Tokens to place the script across all/some pages and then update it more easily if desired.

Translate
Aug 1, 2017 1:40 AM UTC

I create snippets for all my GTM Tags as sometimes we need to leave the GTM tag off.

I then add them using a Marketo variable to the global template in the head.

<div class="mktoSnippet" mktoName="Add Google Tag Manager Code" id="GTM"></div>

I also place a "No Script version just under the <Body> tag

<div class="mktoSnippet" mktoName="Add Google Tag Manager Code No Script" id="GTM_NoScript"></div>

It works for us but you need to remember to add the Snippet on each page build.

Translate
SanfordWhiteman
User Group Leader
User Group Leader
Aug 1, 2017 1:54 AM UTC

Clearer to use a boolean, no? (Unless you have multiple GTM "on" options.)

Translate