diff --git a/layouts/partials/hooks/body-end.html b/layouts/partials/hooks/body-end.html index 383d954..3b9b40d 100644 --- a/layouts/partials/hooks/body-end.html +++ b/layouts/partials/hooks/body-end.html @@ -1,4 +1,6 @@ {{/* Use this file to include anything you wish to append to the end of the body tag */ -}} -{{ partial "gtm-noscript.html" . }} +{{ if hugo.IsProduction -}} + {{ partial "gtm-noscript.html" . }} +{{ end -}} diff --git a/layouts/partials/hooks/head-end.html b/layouts/partials/hooks/head-end.html index b3caa87..1902c7b 100644 --- a/layouts/partials/hooks/head-end.html +++ b/layouts/partials/hooks/head-end.html @@ -1,3 +1,5 @@ {{ partial "meta.html" . -}} {{ partial "favicons.html" . -}} -{{ partial "gtm.html" . }} +{{ if hugo.IsProduction -}} + {{ partial "gtm.html" . }} +{{ end -}}