mirror of
https://github.com/hacks-guide/minimal-mistakes.git
synced 2024-11-27 02:40:32 +00:00
Update Google Universal Analytics to load async (#2079)
This commit is contained in:
parent
d5dae86319
commit
bd5f157833
@ -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');
|
||||
|
||||
ga('create', '{{ site.analytics.google.tracking_id }}', 'auto');
|
||||
ga('set', 'anonymizeIp', {{ site.analytics.google.anonymize_ip | default: false }})
|
||||
ga('send', 'pageview');
|
||||
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')
|
||||
</script>
|
||||
<script src="https://www.google-analytics.com/analytics.js" async></script>
|
||||
|
Loading…
Reference in New Issue
Block a user