Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gohugoio/gohugoioTheme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Oliff <christianoliff@pm.me>2020-09-07 17:30:58 +0300
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-09-07 17:51:59 +0300
commitd259ca4adfc6dba96127c44c6fe9ad360c208019 (patch)
treebf8d9553bec4a806a5d60af1bf2601e426ced225
parent37834c89741073534866574064e739d778fde15c (diff)
Add anonymize_ip to gtag for improved user privacy
This helps a bit with #106 (see comment https://github.com/gohugoio/gohugoioTheme/issues/106#issuecomment-544596903)
-rw-r--r--layouts/partials/gtag.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/layouts/partials/gtag.html b/layouts/partials/gtag.html
index 2cedc384..fe9f4d2a 100644
--- a/layouts/partials/gtag.html
+++ b/layouts/partials/gtag.html
@@ -6,7 +6,7 @@
gtag('js', new Date());
{{ $site := $.Site.BaseURL | replaceRE "^https?://(www\\.)?([^/]+).*" "$2" }}
- gtag('config', '{{ . }}', {'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'});
+ gtag('config', '{{ . }}', {'anonymize_ip': true, 'dimension1': '{{ $site }}', 'dimension2': '{{ getenv "BRANCH" }}'});
/**
* Function that tracks a click on an outbound link in Analytics.