Merge pull request #250 from Labs64/pr-anonymize_ip

Enable IP anonymization in Google Analytics (GDPR)
pull/1/head
Patrick Marsceill 3 years ago committed by GitHub
commit 0716ea77d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -59,6 +59,7 @@ color_scheme: nil
# Google Analytics Tracking (optional)
# e.g, UA-1234567-89
ga_tracking: UA-2709176-10
ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (true by default)
plugins:
- jekyll-seo-tag

@ -21,7 +21,7 @@
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', "{{ site.ga_tracking }}");
gtag('config', '{{ site.ga_tracking }}'{% unless site.ga_tracking_anonymize_ip == nil %}, { 'anonymize_ip': true }{% endunless %});
</script>
{% endif %}

@ -103,4 +103,5 @@ See [Customization]({{ site.baseurl }}{% link docs/customization.md %}) for more
# Google Analytics Tracking (optional)
# e.g, UA-1234567-89
ga_tracking: UA-5555555-55
ga_tracking_anonymize_ip: true # Use GDPR compliant Google Analytics settings (true by default)
```

Loading…
Cancel
Save