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:
Sabe Jones
2018-08-20 14:13:22 -05:00
committed by GitHub
parent f27e9b02d8
commit c78b5ecf7c
11 changed files with 57 additions and 25 deletions

View File

@@ -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);
},
};

View File

@@ -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,
});
}
},