Update Google Universal Analytics to load async (#2079)
This commit is contained in:
parent
d5dae86319
commit
bd5f157833
1 changed files with 5 additions and 8 deletions
|
@ -1,10 +1,7 @@
|
|||
<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','https://www.google-analytics.com/analytics.js','ga');
|
||||
|
||||
window.ga=function(){ga.q.push(arguments)};ga.q=[];ga.l=+new Date;
|
||||
ga('create','{{ site.analytics.google.tracking_id }}','auto');
|
||||
ga('set', 'anonymizeIp', {{ site.analytics.google.anonymize_ip | default: false }})
|
||||
ga('send', 'pageview');
|
||||
ga('set', 'anonymizeIp', {{ site.analytics.google.anonymize_ip | default: false }});
|
||||
ga('send','pageview')
|
||||
</script>
|
||||
<script src="https://www.google-analytics.com/analytics.js" async></script>
|
||||
|
|
Loading…
Reference in a new issue