Skip to content

Commit

Permalink
Remove AnonymizeIP as unnecessary for GA4
Browse files Browse the repository at this point in the history
  • Loading branch information
ghalse committed Apr 18, 2024
1 parent 297e725 commit 49fc28f
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,10 @@
{{ with .Site.GoogleAnalytics }}
{{ if hasPrefix . "G-"}}
tarteaucitron.user.gtagUa = '{{ . }}';
tarteaucitron.user.gtagMore = function () { gtag('config', '{{ . }}', { 'anonymize_ip': {{- $pc.AnonymizeIP -}} }); };
(tarteaucitron.job = tarteaucitron.job || []).push('gtag');
{{ else if hasPrefix . "UA-" }}
tarteaucitron.user.analyticsUa = '{{ . }}';
{{- if $pc.AnonymizeIP }}
tarteaucitron.user.analyticsMore = function () { ga('set', 'anonymizeIp', true); };
{{ end }}
{{ end }}
(tarteaucitron.job = tarteaucitron.job || []).push('analytics');
Expand Down

0 comments on commit 49fc28f

Please sign in to comment.