17. Page <Head>
Page <Body> dataLayer
Placing everything in the
<body> works
gtm.js script
ns.html noscript iframe
GTM
no head
There will be a -1% reduction
in reported traffic
18. If only a global footer is possible...
GTM
footer
19. Page <Head>
Page <Body> dataLayer
Placing everything
in footer
gtm.js script
ns.html noscript iframe
There will be a -2% reduction
in reported traffic
GTM
footer
21. Page <Head>
Page <Body>
dataLayer
jQuery goes here...
gtm.js script
ns.html noscript iframe
jQuery
GTM
new position
i.e Don’t place jQuery after gtm.js
as you wont be able to reliably call
jQuery functions
23. Page <Head>
Page <Body>
Never place an
iframe in <head>
gtm.js script
ns.html noscript iframe
GTM
wrong position
It will break W3C
validation & IE will
trigger a warning
25. Page <Head>
Page <Body>
dataLayer
2 script
gtm.js script1
ns.html noscript1 iframe
GTM
2 scripts
gtm.js script2
ns.html noscript2 iframe
1. The reason I don’t recommend this is there is a small increase in download
size and JS execution cost from using 2 scripts. So, when possible try to
consolidate into 1 script.
2. The GA360 zone feature uses a nested second script.
32. Page <Head>
Page <Body> dataLayer
Placing everything in the
<body> does work
gtm.js script
ns.html noscript iframe
GTM
no head
There will be a -1% reduction
in reported traffic
33. Page <Head>
Page <Body> dataLayer
Placing everything
in footer
gtm.js script
ns.html noscript iframe
There will be a -2% reduction
in reported traffic
GTM
footer