add a check for production (#1335)

This commit is contained in:
Gayathri625 2024-07-29 22:21:04 +05:30 committed by GitHub
parent c9c616059c
commit d03274f390
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 2 deletions

View File

@ -1,4 +1,6 @@
{{/* Use this file to include anything you wish to append to the end of the body tag */ -}}
<!-- GTM code snippet for js disabled browsers -->
<!-- Placing the noscript code snippet at the end of the body can lead to missing some events during page load, but since users with JavaScript disabled browsers are rare, this placement is acceptable. -->
{{ partial "gtm-noscript.html" . }}
{{ if hugo.IsProduction -}}
{{ partial "gtm-noscript.html" . }}
{{ end -}}

View File

@ -1,3 +1,5 @@
{{ partial "meta.html" . -}}
{{ partial "favicons.html" . -}}
{{ partial "gtm.html" . }}
{{ if hugo.IsProduction -}}
{{ partial "gtm.html" . }}
{{ end -}}