-
Notifications
You must be signed in to change notification settings - Fork 12.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sets anonymizeIp to true in GA snippet #2219
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice... though I think it'd be worthwhile having a link to Google's docs about IP Anonymization.
https://support.google.com/analytics/answer/2763052?hl=en
Explains how it works with some useful additional links.
dist/doc/html.md
Outdated
@@ -176,6 +176,13 @@ included. | |||
We use `analytics.js` rather than the newer `gtag.js` as | |||
[it's faster and supports tasks and plugins](https://github.com/philipwalton/analyticsjs-boilerplate/issues/19#issuecomment-333714370) | |||
|
|||
Starting with version 8 we, by default, <a href="https://support.google.com/analytics/answer/2763052?hl=en">anonymizse IP addresses</a>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anonymize typo here 🤓
Also - should use markdown style links, not HTML ones I think
dist/doc/html.md
Outdated
By default Google Analytics records the full IP address of a user visiting the site, but | ||
that full IP address is never available to the Google Analytics property admin. | ||
By anonymizing the IP address you can make your site more GDPR-compliant as a | ||
full IP address can be defined as PII (publicly identifiable information.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry another thing... my fault as this was copied from my comment... but this should actually be personally identifiable information (PII)
REF: https://en.wikipedia.org/wiki/Personal_data
By default Google Analytics records the full IP address of a user visiting the site, but | ||
that full IP address is never available to the Google Analytics property admin. | ||
By anonymizing the IP address you can make your site more GDPR-compliant as a | ||
full IP address can be defined as PII (publicly identifiable information.) | ||
full IP address can be defined as PII (personally identifiable information.) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, last nit-pick and then we're good. There's 2 line breaks after this section and should be just 1 to be consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit-picking is why we're here 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. looks good.
Overall, in the markdown docs there are some inconsistencies in line-lengths and line breaks which we should probably deal with at some point...
Not related to this PR specifically; just a general thought
Another level of privacy might be to respect the DoNotTrack signal of browsers. In that case, the code would be wrapped in a conditional: var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
if (dnt !== 'yes' && dnt !== '1') {
window.ga = function () { ga.q.push(arguments) }; ga.q = []; ga.l = +new Date;
ga('create', 'UA-XXXXX-Y', 'auto'); ga('set', 'anonymizeIp', true); ga('set','transport','beacon'); ga('send', 'pageview');
} |
thanks @TheDancingCode - the DoNotTrack has actually been deprecated now.
|
closes #2212