mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 14:47:53 +01:00
Analytics: More / improved tracking (#10608)
* WIP(analytics): add / improve tracking * fix(groups): revert attempt at tracking on group model * fix(analytics): track questing based on user data * each buy-operation now has a getItemType method - typo getItemKey - removed unneeded overrides
This commit is contained in:
@@ -1213,6 +1213,16 @@ api.inviteToGroup = {
|
||||
results.push(...emailResults);
|
||||
}
|
||||
|
||||
let analyticsObject = {
|
||||
uuid: user._id,
|
||||
hitType: 'event',
|
||||
category: 'behavior',
|
||||
groupType: group.type,
|
||||
headers: req.headers,
|
||||
};
|
||||
|
||||
res.analytics.track('group invite', analyticsObject);
|
||||
|
||||
res.respond(200, results);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -175,6 +175,7 @@ api.createUserTasks = {
|
||||
hitType: 'event',
|
||||
category: 'behavior',
|
||||
taskType: task.type,
|
||||
headers: req.headers,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -702,6 +703,7 @@ api.scoreTask = {
|
||||
category: 'behavior',
|
||||
taskType: task.type,
|
||||
direction,
|
||||
headers: req.headers,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user