mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 11:38:24 +00:00
chore(analytics): upgrade GA to universal analytics (cc @deilann)
This commit is contained in:
parent
e3b5a3978a
commit
f95dac7d1d
1 changed files with 6 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue