Do-not-track
This commit is contained in:
parent
bd28332252
commit
5d041ff6f8
1 changed files with 8 additions and 6 deletions
|
@ -26,9 +26,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
if ($bloganalytics) { // check if google analytics is enabled
|
if ($bloganalytics) { // check if google analytics is enabled
|
||||||
?>
|
if (!($_SERVER['HTTP_DNT'] == 1)) {
|
||||||
<script>
|
?>
|
||||||
|
<script>
|
||||||
|
|
||||||
(function (i, s, o, g, r, a, m) {
|
(function (i, s, o, g, r, a, m) {
|
||||||
i['GoogleAnalyticsObject'] = r;
|
i['GoogleAnalyticsObject'] = r;
|
||||||
|
@ -36,7 +37,7 @@ if ($bloganalytics) { // check if google analytics is enabled
|
||||||
(i[r].q = i[r].q || []).push(arguments);
|
(i[r].q = i[r].q || []).push(arguments);
|
||||||
}, i[r].l = 1 * new Date();
|
}, i[r].l = 1 * new Date();
|
||||||
a = s.createElement(o),
|
a = s.createElement(o),
|
||||||
m = s.getElementsByTagName(o)[0];
|
m = s.getElementsByTagName(o)[0];
|
||||||
a.async = 1;
|
a.async = 1;
|
||||||
a.src = g;
|
a.src = g;
|
||||||
m.parentNode.insertBefore(a, m);
|
m.parentNode.insertBefore(a, m);
|
||||||
|
@ -45,8 +46,9 @@ if ($bloganalytics) { // check if google analytics is enabled
|
||||||
ga('create', '<?php echo $bloganalytics; ?>', 'auto');
|
ga('create', '<?php echo $bloganalytics; ?>', 'auto');
|
||||||
ga('send', 'pageview');
|
ga('send', 'pageview');
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
Reference in a new issue