Analytics: use GA4 site tag only (#1554)

This commit is contained in:
Patrice Chalin 2022-07-18 17:06:06 -04:00 committed by GitHub
parent d8b15f748a
commit ccfa0ece8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 1 additions and 20 deletions

View File

@ -3,6 +3,7 @@ disableKinds: [taxonomy, taxonomyTerm]
theme: [docsy]
disableAliases: true # We do redirects via Netlify's _redirects file
enableGitInfo: true
googleAnalytics: G-QZHM7YEG07
# Language settings
enableMissingTranslationPlaceholders: true
@ -54,7 +55,6 @@ params:
github_repo: https://github.com/open-telemetry/opentelemetry.io
github_branch: main
gcs_engine_id: bde3d634eca9cd335
googleAnalytics: [G-QZHM7YEG07, UA-154693307-1]
ui:
footer_about_disable: true

View File

@ -1,16 +0,0 @@
{{/* Global site tag (gtag.js) - Google Analytics */ -}}
{{ with .Site.Params.GoogleAnalytics -}}
{{ $ga_ids := . -}}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ index $ga_ids 0 }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
{{ range $ga_ids }}
gtag('config', '{{ . }}');
{{- end }}
</script>
{{- end -}}

View File

@ -1,3 +0,0 @@
{{ if hugo.IsProduction -}}
{{ partial "google-analytics.html" . -}}
{{ end -}}