-
-
Save dopsmain/8429a8ae26442609d7048ec629d7a7f1 to your computer and use it in GitHub Desktop.
Replace default ga.js location with local file.
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
$(document).ready(function(e) { | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
//ga.src = ('https:' == document.location.protocol ? '<a href="https://ssl">https://ssl</a>' : '<a href="http://www">http://www</a>') + '.<a href="http://google-analytics.com/ga.js">google-analytics.com/ga.js</a>'; | |
//replace the google provided src attribute with the local file starting from the www directory | |
ga.src = 'ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); | |
})(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment