Merge pull request #34251 from dradetsky/disable-gtag-in-local

Omit Google Analytics code for local Hugo website build
pull/34283/head
Kubernetes Prow Robot 2022-06-14 05:35:34 -07:00 committed by GitHub
commit 7aa5a90d74
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -6,6 +6,7 @@
{{- else -}}
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
{{- end -}}
{{- if in (slice "production" "nonprod") hugo.Environment -}}
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-36037335-10"></script>
<script>
@ -15,6 +16,7 @@
gtag('config', 'UA-36037335-10');
</script>
{{- end -}}
<!-- alternative translations -->
{{ range .Translations -}}