chore(analytics): upgrade GA to universal analytics (cc @deilann)

This commit is contained in:
Tyler Renelle 2014-02-03 11:06:10 -07:00
parent e3b5a3978a
commit f95dac7d1d

View file

@ -22,8 +22,12 @@ habitrpg.controller("FooterCtrl", ['$scope', '$rootScope', 'User', '$http', 'Not
// Google Analytics, only in production
if (window.env.NODE_ENV === 'production') {
window._gaq = [["_setAccount", "UA-33510635-1"], ["_setDomainName", "habitrpg.com"], ["_trackPageview"]];
$.getScript(("https:" === document.location.protocol ? "https://ssl" : "http://www") + ".google-analytics.com/ga.js");
(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','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-33510635-1', 'habitrpg.com');
ga('send', 'pageview');
}
// Scripts only for desktop