mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
fix(analytics): correct formatting for client events
Also corrects end date in Bird Buddies string
This commit is contained in:
@@ -74,17 +74,19 @@ export default {
|
||||
|
||||
const tasksScoredCount = getLocalSetting(CONSTANTS.keyConstants.TASKS_SCORED_COUNT);
|
||||
if (!tasksScoredCount || tasksScoredCount < 2) {
|
||||
Analytics.track('task scored', {
|
||||
uuid: user._id,
|
||||
Analytics.track({
|
||||
eventName: 'task scored',
|
||||
eventAction: 'click',
|
||||
eventCategory: 'behavior',
|
||||
hitType: 'event',
|
||||
category: 'behavior',
|
||||
uuid: user._id,
|
||||
taskType: task.type,
|
||||
direction,
|
||||
});
|
||||
if (!tasksScoredCount) {
|
||||
setLocalSetting(CONSTANTS.keyConstants.TASKS_SCORED_COUNT, 1);
|
||||
} else {
|
||||
setLocalSetting(CONSTANTS.keyConstants.TASKS_SCORED_COUNT, tasksScoredCount + 1);
|
||||
setLocalSetting(CONSTANTS.keyConstants.TASKS_SCORED_COUNT, Number(tasksScoredCount) + 1);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user