-
-
Save hmnd/5d06856e4dec5edc6cecd69dd3d5f61c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add Google Analytics | |
var gAnalytics = document.createElement('script'); | |
gAnalytics.setAttribute('async', ''); | |
gAnalytics.setAttribute( | |
'src', | |
'https://www.google-analytics.com/analytics.js' | |
); | |
gAnalytics.onload = function () { | |
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date; | |
ga('create', 'UA-XXXXX-Y', 'auto'); | |
ga('send', 'pageview'); | |
}; | |
document.head.insertBefore(gAnalytics, document.head.firstChild); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment