add client and OS info to amplitude events

closes #7865
This commit is contained in:
Phillip Thelen
2016-08-02 16:45:06 +02:00
committed by Blade Barringer
parent e3c40aa142
commit 679378331d
37 changed files with 320 additions and 40 deletions

View File

@@ -34,11 +34,6 @@ habitrpg.controller("GuildsCtrl", ['$scope', 'Groups', 'User', 'Challenges', '$r
Groups.Group.create(group)
.then(function (response) {
var createdGroup = response.data.data;
if (createdGroup.privacy == 'public') {
Analytics.track({'hitType':'event', 'eventCategory':'behavior', 'eventAction':'join group', 'owner':true, 'groupType':'guild', 'privacy': createdGroup.privacy, 'groupName':createdGroup.name})
} else {
Analytics.track({'hitType':'event', 'eventCategory':'behavior', 'eventAction':'join group', 'owner':true, 'groupType':'guild', 'privacy': createdGroup.privacy})
}
$rootScope.hardRedirect('/#/options/groups/guilds/' + createdGroup._id);
});
}
@@ -59,12 +54,6 @@ habitrpg.controller("GuildsCtrl", ['$scope', 'Groups', 'User', 'Challenges', '$r
User.user.guilds.push(joinedGroup._id);
if (joinedGroup.privacy == 'public') {
Analytics.track({'hitType':'event', 'eventCategory':'behavior', 'eventAction':'join group', 'owner':false, 'groupType':'guild','privacy': joinedGroup.privacy, 'groupName': joinedGroup.name})
} else {
Analytics.track({'hitType':'event', 'eventCategory':'behavior', 'eventAction':'join group', 'owner':false, 'groupType':'guild','privacy': joinedGroup.privacy})
}
_.pull(User.user.invitations.guilds, group);
$location.path('/options/groups/guilds/' + joinedGroup._id);