Skip to content

Commit c6e5097

Browse files
committed
Google analytics: use GA4 site tag
1 parent 01be40f commit c6e5097

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

config.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,7 @@ anchor = "smart"
117117

118118
[services]
119119
[services.googleAnalytics]
120-
# Comment out the next line to disable GA tracking. Also disables the feature described in [params.ui.feedback].
121-
id = "UA-00000000-0"
120+
id = "G-JPP6RFM2BP"
122121

123122
[params]
124123
copyright_k8s = "The Kubernetes Authors"

layouts/partials/head.html

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,6 @@
66
{{- else -}}
77
<meta name="ROBOTS" content="NOINDEX, NOFOLLOW">
88
{{- end -}}
9-
{{- if in (slice "production" "nonprod") hugo.Environment -}}
10-
<!-- Global site tag (gtag.js) - Google Analytics -->
11-
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-36037335-10"></script>
12-
<script>
13-
window.dataLayer = window.dataLayer || [];
14-
function gtag(){dataLayer.push(arguments);}
15-
gtag('js', new Date());
16-
17-
gtag('config', 'UA-36037335-10');
18-
</script>
19-
{{- end -}}
209

2110
<!-- alternative translations -->
2211
{{ range .Translations -}}
@@ -36,7 +25,7 @@
3625
{{- template "_internal/schema.html" . -}}
3726
{{- template "_internal/twitter_cards.html" . -}}
3827
{{- if hugo.IsProduction -}}
39-
{{ template "_internal/google_analytics_async.html" . }}
28+
{{ template "_internal/google_analytics.html" . }}
4029
{{ end }}
4130
{{ partialCached "head-css.html" . "asdf" }}
4231
<script

0 commit comments

Comments
 (0)