3 ms·
The snippet seems to circumvent the Google Analytics Opt-out Browser Add-on which many sites mention as a way to disable GA tracking in their privacy policy. So
by nwellnhof 8y ago
The snippet seems to circumvent the Google Analytics Opt-out Browser Add-on which many sites mention as a way to disable GA tracking in their privacy policy. So if you use the snippet, don't tell your users that they can opt out with the add-on.
- davidkuennen 8y agoAre you sure it circumvents it? My uBlock Origin is still properly blocking the API call to google analytics. But since the Add-on is from Google itself it could work in different ways indeed.
- nwellnhof 8y agoYes, the add-on seems to work differently. I suspect that analytics.js somehow checks for its presence and stops collecting data if it was found.
- davidkuennen 8y agoIf someone finds out whatever global variable that add on sets I could add it.
- gorhill 8y agoIt creates a small inline script with this code: window["_gaUserPrefs"] = { ioo : function() { return true; } } I used CRX Viewer extension by Rob Wu[1] to just look up the extension code in Chrome store. [1] https://github.com/Rob--W/crxviewer#chrome-extension-source-viewer-crx-viewer https://github.com/Rob--W/crxviewer#chrome-extension-source-...