Skip to content

Commit

Permalink
privacy: removed google analytics templates from head partial
Browse files Browse the repository at this point in the history
  • Loading branch information
AliceOrunitia committed Aug 27, 2024
1 parent da3590f commit 308e623
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,4 @@

{{ partial "hooks/head-end.html" . -}}

{{/* To comply with GDPR, cookie consent scripts places in head-end must execute before Google Analytics is enabled */ -}}
{{ if hugo.IsProduction -}}
{{ $enableGtagForUniversalAnalytics := not .Site.Params.disableGtagForUniversalAnalytics -}}
{{ if (or $enableGtagForUniversalAnalytics (hasPrefix .Site.GoogleAnalytics "G-")) -}}
{{ template "_internal/google_analytics_gtag.html" . -}}
{{ else -}}
{{ template "_internal/google_analytics_async.html" . -}}
{{ end -}}
{{ end -}}
{{/* To comply with GDPR, cookie consent scripts places in head-end must execute before Google Analytics is enabled. Instead, template is removed */ -}}

0 comments on commit 308e623

Please sign in to comment.