Skip to content

Commit

Permalink
Update GA include to definitely not run on staging (#2951)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored May 23, 2024
1 parent 6f2f452 commit aa316b5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions layouts/docs/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
{{ partial "head.html" . }}
</head>
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
{{- if .Site.GoogleAnalytics -}}
{{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.GoogleAnalytics }}"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{{- end -}}
{{- end -}}{{- end -}}
<header>
{{ partial "navbar.html" . }}
</header>
Expand Down
4 changes: 2 additions & 2 deletions layouts/docs/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
{{ partial "head.html" . }}
</head>
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
{{- if .Site.GoogleAnalytics -}}
{{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.GoogleAnalytics }}"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{{- end -}}
{{- end -}}{{- end -}}
<header>
{{ partial "navbar.html" . }}
</header>
Expand Down
4 changes: 2 additions & 2 deletions layouts/docs/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ <h4 class="alert-heading">DRAFT</h4>
{{ partial "disqus-comment.html" . }}
{{ end }}
{{ partial "page-meta-lastmod.html" . }}
{{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }}
{{- if hugo.IsProduction -}}{{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }}
{{ partial "feedback.html" . }}
<br />
{{ end }}
{{ end }}{{- end -}}
</div>
4 changes: 2 additions & 2 deletions layouts/docs/glossary.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
{{ partial "head.html" . }}
</head>
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
{{- if .Site.GoogleAnalytics -}}
{{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.GoogleAnalytics }}"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{{- end -}}
{{- end -}}{{- end -}}
<header>
{{ partial "navbar.html" . }}
</header>
Expand Down
4 changes: 2 additions & 2 deletions layouts/docs/tutorials.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
{{ partial "head.html" . }}
</head>
<body class="td-{{ .Kind }}{{ with .Page.Params.body_class }} {{ . }}{{ end }}">
{{- if .Site.GoogleAnalytics -}}
{{- if hugo.IsProduction -}}{{- if .Site.GoogleAnalytics -}}
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ .Site.GoogleAnalytics }}"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
{{- end -}}
{{- end -}}{{- end -}}
<header>
{{ partial "navbar.html" . }}
</header>
Expand Down

0 comments on commit aa316b5

Please sign in to comment.