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
+6 -4
View File
@@ -113,16 +113,18 @@ export async function create (store, createdTask) {
const tasksCreatedCount = getLocalSetting(CONSTANTS.keyConstants.TASKS_CREATED_COUNT);
if (!tasksCreatedCount || tasksCreatedCount < 2) {
const uuid = store.state.user.data._id;
Analytics.track('task created', {
uuid,
Analytics.track({
eventName: 'task created',
eventAction: 'click',
eventCategory: 'behavior',
hitType: 'event',
category: 'behavior',
uuid,
taskType: taskRes.type,
});
if (!tasksCreatedCount) {
setLocalSetting(CONSTANTS.keyConstants.TASKS_CREATED_COUNT, 1);
} else {
setLocalSetting(CONSTANTS.keyConstants.TASKS_CREATED_COUNT, tasksCreatedCount + 1);
setLocalSetting(CONSTANTS.keyConstants.TASKS_CREATED_COUNT, Number(tasksCreatedCount) + 1);
}
}
});