mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 00:09:41 +00:00
fix(analytics): Load scripts in factory
This commit is contained in:
parent
196490ecb1
commit
83e0eb374f
2 changed files with 3 additions and 5 deletions
|
|
@ -251,8 +251,4 @@ window.habitrpg = angular.module('habitrpg',
|
|||
$httpProvider.defaults.headers.common['x-api-user'] = settings.auth.apiId;
|
||||
$httpProvider.defaults.headers.common['x-api-key'] = settings.auth.apiToken;
|
||||
}
|
||||
}])
|
||||
|
||||
.run(['Analytics', function(Analytics) {
|
||||
if (window.env.NODE_ENV === 'production') Analytics.loadScripts();
|
||||
}]);
|
||||
|
|
|
|||
|
|
@ -76,6 +76,8 @@
|
|||
ga('set',properties);
|
||||
}
|
||||
|
||||
if (window.env.NODE_ENV === 'production') loadScripts();
|
||||
|
||||
return {
|
||||
loadScripts: loadScripts,
|
||||
register: register,
|
||||
|
|
@ -110,5 +112,5 @@
|
|||
return true;
|
||||
}
|
||||
}
|
||||
}())
|
||||
}());
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue