diff --git a/layouts/_internal/google_analytics_gtag.html b/layouts/_internal/google_analytics_gtag.html index 32b6a33654..2c9c7da908 100644 --- a/layouts/_internal/google_analytics_gtag.html +++ b/layouts/_internal/google_analytics_gtag.html @@ -6,19 +6,19 @@ specifically this version: - https://github.com/gohugoio/hugo/blob/f7e00c039ff3cea5f991b05c1e325666004cf129/tpl/tplimpl/embedded/templates/google_analytics.html + https://github.com/gohugoio/hugo/blob/8d32ca223def4031aa26f98e8efc1a8b4e7b7546/tpl/tplimpl/embedded/templates/google_analytics.html The only differences between this copy and the original are that we've dropped: - The `{{ if hasPrefix . "G-"}}` condition - - The `{{ else }}` block + - The `{{ else ... }}` block - The `anonymize_ip` argument to the `gtag()` call, since it is superfluous. For details, see https://github.com/gohugoio/hugo/issues/10093. */}} {{- $pc := .Site.Config.Privacy.GoogleAnalytics -}} -{{- if not $pc.Disable }}{{ with .Site.GoogleAnalytics -}} +{{- if not $pc.Disable }}{{ with .Site.Config.Services.GoogleAnalytics.ID -}}