Use async Google Analytics tag. #202

This commit is contained in:
Stéphane Goetz 2020-04-24 23:06:41 +02:00
parent 22fd55e9f7
commit 710150c550
1 changed files with 2 additions and 5 deletions

View File

@ -1,9 +1,6 @@
<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.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', '<?= $analytics ?>', '<?= $host ?>');
ga('send', 'pageview');
</script>
<script async src='https://www.google-analytics.com/analytics.js'></script>