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
Solved! Go to Solution.
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
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.
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
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){...