From ff2a42e1b37069b90238a4e65f7335c49b262adf Mon Sep 17 00:00:00 2001 From: Patrice Chalin Date: Mon, 4 Mar 2024 15:10:19 -0500 Subject: [PATCH] Address GA.ID param deprecation warning (#1879) --- layouts/_internal/google_analytics_gtag.html | 6 +++--- layouts/partials/head.html | 2 +- .../content/en/docs/adding-content/feedback.md | 14 +++++++++----- userguide/hugo.yaml | 4 ---- 4 files changed, 13 insertions(+), 13 deletions(-) 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 -}}