Changes to move Google Tag Manager into <head> tag, while leaving the noscript section in the <body> tag.
This commit is contained in:
parent
de64f4bd8b
commit
c10e10e047
3 changed files with 9 additions and 4 deletions
|
@ -79,10 +79,13 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if GOOGLE_TAG_MANAGER %}
|
||||||
|
{% include "partial/gtm.html" %}
|
||||||
|
{% endif %}
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{% if GOOGLE_TAG_MANAGER %}
|
{% if GOOGLE_TAG_MANAGER %}
|
||||||
{% include "partial/gtm.html" %}
|
{% include "partial/gtm_noscript.html" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<aside>
|
<aside>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
<!-- Google Tag Manager -->
|
<!-- Google Tag Manager -->
|
||||||
<noscript>
|
|
||||||
<iframe src="//www.googletagmanager.com/ns.html?id={{ GOOGLE_TAG_MANAGER }}" height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
|
||||||
</noscript>
|
|
||||||
<script>
|
<script>
|
||||||
(function(w,d,s,l,i){
|
(function(w,d,s,l,i){
|
||||||
w[l]=w[l]||[];
|
w[l]=w[l]||[];
|
||||||
|
|
5
templates/partial/gtm_noscript.html
Normal file
5
templates/partial/gtm_noscript.html
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
<!-- Google Tag Manager -->
|
||||||
|
<noscript>
|
||||||
|
<iframe src="//www.googletagmanager.com/ns.html?id={{ GOOGLE_TAG_MANAGER }}" height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
||||||
|
</noscript>
|
||||||
|
<!-- End Google Tag Manager -->
|
Loading…
Add table
Reference in a new issue