Skip to content

Commit aa316b5

Browse files
authored
Update GA include to definitely not run on staging (#2951)
1 parent 6f2f452 commit aa316b5

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

layouts/docs/baseof.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
{{ partial "head.html" . }}
55
</head>
66
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
7-
{{- if .Site.GoogleAnalytics -}}
7+
{{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}}
88
<!-- Google Tag Manager (noscript) -->
99
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.GoogleAnalytics }}"
1010
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
1111
<!-- End Google Tag Manager (noscript) -->
12-
{{- end -}}
12+
{{- end -}}{{- end -}}
1313
<header>
1414
{{ partial "navbar.html" . }}
1515
</header>

layouts/docs/changelog.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
{{ partial "head.html" . }}
55
</head>
66
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
7-
{{- if .Site.GoogleAnalytics -}}
7+
{{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}}
88
<!-- Google Tag Manager (noscript) -->
99
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.GoogleAnalytics }}"
1010
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
1111
<!-- End Google Tag Manager (noscript) -->
12-
{{- end -}}
12+
{{- end -}}{{- end -}}
1313
<header>
1414
{{ partial "navbar.html" . }}
1515
</header>

layouts/docs/content.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ <h4 class="alert-heading">DRAFT</h4>
6565
{{ partial "disqus-comment.html" . }}
6666
{{ end }}
6767
{{ partial "page-meta-lastmod.html" . }}
68-
{{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }}
68+
{{- if hugo.IsProduction -}}{{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }}
6969
{{ partial "feedback.html" . }}
7070
<br />
71-
{{ end }}
71+
{{ end }}{{- end -}}
7272
</div>

layouts/docs/glossary.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
{{ partial "head.html" . }}
55
</head>
66
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
7-
{{- if .Site.GoogleAnalytics -}}
7+
{{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}}
88
<!-- Google Tag Manager (noscript) -->
99
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.GoogleAnalytics }}"
1010
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
1111
<!-- End Google Tag Manager (noscript) -->
12-
{{- end -}}
12+
{{- end -}}{{- end -}}
1313
<header>
1414
{{ partial "navbar.html" . }}
1515
</header>

layouts/docs/tutorials.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44
{{ partial "head.html" . }}
55
</head>
66
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
7-
{{- if .Site.GoogleAnalytics -}}
7+
{{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}}
88
<!-- Google Tag Manager (noscript) -->
99
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.GoogleAnalytics }}"
1010
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
1111
<!-- End Google Tag Manager (noscript) -->
12-
{{- end -}}
12+
{{- end -}}{{- end -}}
1313
<header>
1414
{{ partial "navbar.html" . }}
1515
</header>

0 commit comments

Comments
 (0)