mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-06-14 11:52:32 +03:00
Added support for Google Analytics async snippet loading (#921)
Snippet from Google: https://developers.google.com/analytics/devguides/collection/analyticsjs/#alternative_async_tracking_snippet Recommended by HTML5Boilerplate: https://github.com/h5bp/html5-boilerplate/blob/master/dist/index.html
This commit is contained in:
parent
4e72119d20
commit
f9b4a63ebc
@ -22,13 +22,7 @@
|
||||
|
||||
<!-- Google Analytics integration -->
|
||||
<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=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
||||
|
||||
/* General initialization */
|
||||
ga("create",
|
||||
@ -59,3 +53,4 @@
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<script async src='https://www.google-analytics.com/analytics.js'></script>
|
||||
|
Loading…
Reference in New Issue
Block a user