diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-05-25 10:53:39 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2018-05-25 10:53:39 +0200 |
commit | 1f1d955b56471e41d5288c57f1ef8333dc297120 (patch) | |
tree | 62861fc8be43b2be7790ef868632dc073c6d2840 /tpl | |
parent | ffcf26e68cac843f8b257ee72f0282f405ad04a8 (diff) |
Add anonymizeIP to GA privacy config
See #4751
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/tplimpl/embedded/templates.autogen.go | 2 | ||||
-rwxr-xr-x | tpl/tplimpl/embedded/templates/google_analytics.html | 1 | ||||
-rwxr-xr-x | tpl/tplimpl/embedded/templates/google_analytics_async.html | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/tpl/tplimpl/embedded/templates.autogen.go b/tpl/tplimpl/embedded/templates.autogen.go index 9b4db35d6..9637deb10 100644 --- a/tpl/tplimpl/embedded/templates.autogen.go +++ b/tpl/tplimpl/embedded/templates.autogen.go @@ -111,6 +111,7 @@ if (!doNotTrack) { })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', '{{ . }}', 'auto'); ga('send', 'pageview'); + {{ if $pc.AnonymizeIP }}ga('set', 'anonymizeIp', true);{{ end -}} } </script> {{ end }} @@ -133,6 +134,7 @@ if (!doNotTrack) { window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; ga('create', '{{ . }}', 'auto'); ga('send', 'pageview'); + {{ if $pc.AnonymizeIP }}ga('set', 'anonymizeIp', true);{{ end -}} } </script> <script async src='//www.google-analytics.com/analytics.js'></script> diff --git a/tpl/tplimpl/embedded/templates/google_analytics.html b/tpl/tplimpl/embedded/templates/google_analytics.html index ae4898c7a..611c1c726 100755 --- a/tpl/tplimpl/embedded/templates/google_analytics.html +++ b/tpl/tplimpl/embedded/templates/google_analytics.html @@ -10,6 +10,7 @@ if (!doNotTrack) { })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', '{{ . }}', 'auto'); ga('send', 'pageview'); + {{ if $pc.AnonymizeIP }}ga('set', 'anonymizeIp', true);{{ end -}} } </script> {{ end }} diff --git a/tpl/tplimpl/embedded/templates/google_analytics_async.html b/tpl/tplimpl/embedded/templates/google_analytics_async.html index b81ade025..18e18a168 100755 --- a/tpl/tplimpl/embedded/templates/google_analytics_async.html +++ b/tpl/tplimpl/embedded/templates/google_analytics_async.html @@ -7,6 +7,7 @@ if (!doNotTrack) { window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; ga('create', '{{ . }}', 'auto'); ga('send', 'pageview'); + {{ if $pc.AnonymizeIP }}ga('set', 'anonymizeIp', true);{{ end -}} } </script> <script async src='//www.google-analytics.com/analytics.js'></script> |