mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
chore(analytics): Gem transfer tracking and shorten task score period
This commit is contained in:
@@ -761,6 +761,16 @@ api.transferGems = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
res.respond(200, {});
|
res.respond(200, {});
|
||||||
|
|
||||||
|
if (res.analytics) {
|
||||||
|
res.analytics.track('transfer gems', {
|
||||||
|
uuid: sender._id,
|
||||||
|
hitType: 'event',
|
||||||
|
category: 'behavior',
|
||||||
|
headers: req.headers,
|
||||||
|
quantity: gemAmount,
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -474,7 +474,7 @@ async function scoreTask (user, task, direction, req, res) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Track when new users (first 7 days) score tasks
|
// Track when new users (first 7 days) score tasks
|
||||||
if (moment().diff(user.auth.timestamps.created, 'days') < 7) {
|
if (moment().diff(user.auth.timestamps.created, 'days') < 3) {
|
||||||
res.analytics.track('task score', {
|
res.analytics.track('task score', {
|
||||||
uuid: user._id,
|
uuid: user._id,
|
||||||
hitType: 'event',
|
hitType: 'event',
|
||||||
|
|||||||
Reference in New Issue
Block a user