aboutsummaryrefslogtreecommitdiffhomepage
path: root/tpl
diff options
context:
space:
mode:
authorPatrice Chalin <[email protected]>2024-08-29 15:32:46 -0400
committerGitHub <[email protected]>2024-08-29 21:32:46 +0200
commit53a8de21b86977efd9187955fb4bd0e75375d666 (patch)
tree2a922fbdc558294776ea0428ce922f93e1e581be /tpl
parent37609262dcddac6d3358412b10214111b4d4dc3d (diff)
downloadhugo-53a8de21b86977efd9187955fb4bd0e75375d666.tar.gz
hugo-53a8de21b86977efd9187955fb4bd0e75375d666.zip
tpl: Trim whitespace from google_analytics.html
Diffstat (limited to 'tpl')
-rw-r--r--tpl/tplimpl/embedded/templates/google_analytics.html14
1 files changed, 7 insertions, 7 deletions
diff --git a/tpl/tplimpl/embedded/templates/google_analytics.html b/tpl/tplimpl/embedded/templates/google_analytics.html
index b8930d4bd..49856630f 100644
--- a/tpl/tplimpl/embedded/templates/google_analytics.html
+++ b/tpl/tplimpl/embedded/templates/google_analytics.html
@@ -1,8 +1,8 @@
{{ if not site.Config.Privacy.GoogleAnalytics.Disable }}
- {{ with site.Config.Services.GoogleAnalytics.ID }}
- {{ if strings.HasPrefix (lower .) "ua-" }}
- {{ warnf "Google Analytics 4 (GA4) replaced Google Universal Analytics (UA) effective 1 July 2023. See https://support.google.com/analytics/answer/11583528. Create a GA4 property and data stream, then replace the Google Analytics ID in your site configuration with the new value." }}
- {{ else }}
+ {{- with site.Config.Services.GoogleAnalytics.ID }}
+ {{- if strings.HasPrefix (lower .) "ua-" }}
+ {{- warnf "Google Analytics 4 (GA4) replaced Google Universal Analytics (UA) effective 1 July 2023. See https://support.google.com/analytics/answer/11583528. Create a GA4 property and data stream, then replace the Google Analytics ID in your site configuration with the new value." }}
+ {{- else }}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ . }}"></script>
<script>
var doNotTrack = false;
@@ -17,6 +17,6 @@
gtag('config', '{{ . }}');
}
</script>
- {{ end }}
- {{ end }}
-{{ end }}
+ {{- end }}
+ {{- end }}
+{{- end -}}