Created
April 21, 2016 12:59
-
-
Save Godoy/dd3ba485f46012247b53b07e4693dbe7 to your computer and use it in GitHub Desktop.
async load analytics javascript script tag
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
(function(){ | |
window['GoogleAnalyticsObject'] = 'ga'; | |
window['ga'] = | |
window['ga'] | |
|| | |
function(){ | |
(window['ga'].q = window['ga'].q || []) | |
.push(arguments) | |
}, | |
window['ga'].l = 1 * new Date(); | |
a = document.createElement('script'), | |
m = document.getElementsByTagName('script')[0]; | |
a.async = 1; | |
a.src = '//www.google-analytics.com/analytics.js'; | |
m.parentNode.insertBefore(a, m) | |
})(); | |
ga('create', 'UA-XXXXXXXX-1', 'auto'); | |
ga('send', 'pageview'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment