Skip to content

Commit

Permalink
Merge pull request mmistakes#250 from Labs64/pr-anonymize_ip
Browse files Browse the repository at this point in the history
Enable IP anonymization in Google Analytics (GDPR)
  • Loading branch information
pmarsceill authored Apr 24, 2020
2 parents 2ec9e67 + c06eae8 commit 0716ea7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
1 change: 1 addition & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```

0 comments on commit 0716ea7

Please sign in to comment.