mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 23:27:26 +01:00
feat(analytics): Server tweaks
Remove duplicate browser-side tracking for new user registration. Move quest tracking to server side and expand to include all quest accept/reject actions.
This commit is contained in:
@@ -50,15 +50,6 @@ angular.module('habitrpg')
|
||||
if($rootScope.selectedLanguage) url = url + '?lang=' + $rootScope.selectedLanguage.code;
|
||||
$http.post(url, scope.registerVals).success(function(data, status, headers, config) {
|
||||
runAuth(data.id, data.apiToken);
|
||||
if (status == 200) {
|
||||
if (data.auth.facebook) {
|
||||
Analytics.updateUser({'email':data.auth.facebook._json.email,'language':data.preferences.language});
|
||||
Analytics.track({'hitType':'event','eventCategory':'acquisition','eventAction':'register','authType':'facebook'});
|
||||
} else {
|
||||
Analytics.updateUser({'email':data.auth.local.email,'language':data.preferences.language});
|
||||
Analytics.track({'hitType':'event','eventCategory':'acquisition','eventAction':'register','authType':'email'});
|
||||
}
|
||||
}
|
||||
}).error(errorAlert);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user