Google analytics: use GA4 site tag

pull/36010/head
Patrice Chalin 2022-08-16 07:19:08 -04:00
parent 01be40fc62
commit c6e50979d2
2 changed files with 2 additions and 14 deletions

View File

@ -117,8 +117,7 @@ anchor = "smart"
[services]
[services.googleAnalytics]
# Comment out the next line to disable GA tracking. Also disables the feature described in [params.ui.feedback].
id = "UA-00000000-0"
id = "G-JPP6RFM2BP"
[params]
copyright_k8s = "The Kubernetes Authors"

View File

@ -6,17 +6,6 @@
{{- 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>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-36037335-10');
</script>
{{- end -}}
<!-- alternative translations -->
{{ range .Translations -}}
@ -36,7 +25,7 @@
{{- template "_internal/schema.html" . -}}
{{- template "_internal/twitter_cards.html" . -}}
{{- if hugo.IsProduction -}}
{{ template "_internal/google_analytics_async.html" . }}
{{ template "_internal/google_analytics.html" . }}
{{ end }}
{{ partialCached "head-css.html" . "asdf" }}
<script