Two GTA in one page | Community
Skip to main content
Harish_Gupta6
New Participant
October 19, 2016
Solved

Two GTA in one page

  • October 19, 2016
  • 2 replies
  • 2184 views

Hi,

Is it fine, if I will add two google tag manager script in head tag of one landing page?

Also, currently, one GTM code has been added in templates and I want to replace it in only one landing page(Not from template). Can you suggest me how to implement this?

Thanks

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Harish_Gupta6

Hi Sanford,

Thanks for help. Can you suggest the best place on landing page to place the GA code if I will use the mktoBoolean variable?

Thanks

2 replies

Harish_Gupta6
Harish_Gupta6AuthorAccepted solution
New Participant
October 20, 2016

Hi Sanford,

Thanks for help. Can you suggest the best place on landing page to place the GA code if I will use the mktoBoolean variable?

Thanks

Harish Gupta
SanfordWhiteman
New Participant
October 19, 2016

Is it fine, if I will add two google tag manager script in head tag of one landing page?

It's "fine" but not recommended b/c it can cause immense confusion.  If you control both GTMs you should consolidate into one.

Also, currently, one GTM code has been added in templates and I want to replace it in only one landing page(Not from template). Can you suggest me how to implement this?

The only way to "override" an included script from the template is to make the inclusion itself always based on a variable. For example, create a mktoBoolean variable, defaulting to true, and only load the GTM if the variable is still true at the LP level.

Harish_Gupta6
New Participant
October 20, 2016

Hi Sanford,

Thanks for help. Can you suggest the best place on landing page to place the GA code if I will use the mktoBoolean variable?

Thanks

Harish Gupta
SanfordWhiteman
New Participant
October 20, 2016

Well, you would typically add it to the <HEAD> of the template.  With a boolean called enableGTM1, you would wrap it like:

<script>${enableGTM1} && (function(w,d,s,l,i){...