Bug 1129507 - Honor DNT for Loop analytics. r=mikedeboer

This commit is contained in:
Adam Roach [:abr] 2015-02-09 11:07:57 +00:00
parent cf4227f6c7
commit 129437a33f

View File

@ -15,13 +15,22 @@
<link rel="localization" href="l10n/{locale}/loop.properties">
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
// window.navigator.doNotTrack "yes" is for old versions of FF
// window.navigator.doNotTrack "1" is for current versions of FF + Chrome + Opera
// window.doNotTrack is safari
// window.navigator.msDoNotTrack
if (window.navigator.doNotTrack !== "yes" &&
window.navigator.doNotTrack !== "1" &&
window.doNotTrack !== "1" &&
window.navigator.msDoNotTrack !== "1") {
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-36116321-15', 'auto');
ga('send', 'pageview');
ga('create', 'UA-36116321-15', 'auto');
ga('send', 'pageview');
}
</script>
</head>