Skip to content

Commit

Permalink
tpl: Trim whitespace from google_analytics.html
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin authored Aug 29, 2024
1 parent 3760926 commit 53a8de2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tpl/tplimpl/embedded/templates/google_analytics.html
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -17,6 +17,6 @@
gtag('config', '{{ . }}');
}
</script>
{{ end }}
{{ end }}
{{ end }}
{{- end }}
{{- end }}
{{- end -}}

0 comments on commit 53a8de2

Please sign in to comment.