fix(analytics): correct formatting for client events

Also corrects end date in Bird Buddies string
This commit is contained in:
Sabe Jones
2021-09-15 11:21:16 -05:00
parent 660d6f7777
commit 5bfef56dfa
5 changed files with 14 additions and 26 deletions

View File

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