[gdpr-prep] Making Google Analytics anonymize IPs, use async load, and respect Do-Not-Track.
This commit is contained in:
parent
c21693c951
commit
0801daf9ec
|
@ -81,13 +81,17 @@
|
||||||
activationElement: null
|
activationElement: null
|
||||||
};
|
};
|
||||||
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
document.write('<button class="js-gitter-toggle-chat-button">Toggle Chat</button>');
|
||||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
var dnt = navigator.doNotTrack || window.doNotTrack || navigator.msDoNotTrack;
|
||||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
if (dnt != "1" && dnt != "yes") {
|
||||||
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||||
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
|
||||||
ga('create', 'UA-70822533-1', 'auto');
|
ga('create', 'UA-70822533-1', 'auto');
|
||||||
|
ga('set', 'anonymizeIp', true);
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
} else {
|
||||||
|
console.debug("Respecting Do-Not-Track, not running analytics.");
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||||
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
|
||||||
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
|
||||||
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
<script src="https://sidecar.gitter.im/dist/sidecar.v1.js" async defer></script>
|
||||||
|
|
Loading…
Reference in New Issue