Analytics: use GA4 site tag only (#1554)
This commit is contained in:
parent
d8b15f748a
commit
ccfa0ece8a
|
@ -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
|
||||
|
|
|
@ -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 -}}
|
|
@ -1,3 +0,0 @@
|
|||
{{ if hugo.IsProduction -}}
|
||||
{{ partial "google-analytics.html" . -}}
|
||||
{{ end -}}
|
Loading…
Reference in New Issue