mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +01:00
chore(analytics): open the task firehose
This commit is contained in:
@@ -438,17 +438,14 @@ async function scoreTask (user, task, direction, req, res) {
|
||||
user,
|
||||
});
|
||||
|
||||
// Track when new users (first 7 days) score tasks
|
||||
if (moment().diff(user.auth.timestamps.created, 'days') < 3) {
|
||||
res.analytics.track('task score', {
|
||||
uuid: user._id,
|
||||
hitType: 'event',
|
||||
category: 'behavior',
|
||||
taskType: task.type,
|
||||
direction,
|
||||
headers: req.headers,
|
||||
});
|
||||
}
|
||||
res.analytics.track('task score', {
|
||||
uuid: user._id,
|
||||
hitType: 'event',
|
||||
category: 'behavior',
|
||||
taskType: task.type,
|
||||
direction,
|
||||
headers: req.headers,
|
||||
});
|
||||
|
||||
return {
|
||||
task,
|
||||
|
||||
Reference in New Issue
Block a user