fix(analytics): problems

This commit is contained in:
Sabe Jones
2020-03-30 11:01:41 -05:00
parent 947e8a1836
commit bb9912de89
8 changed files with 11 additions and 10 deletions

View File

@@ -205,7 +205,7 @@ api.createUserTasks = {
tasks.forEach(task => {
// Track when new users (first 7 days) create tasks
if (moment().diff(user.auth.timestamps.created, 'days') < 7) {
if (moment().diff(user.auth.timestamps.created, 'days') < 7 && user.flags.welcomed) {
res.analytics.track('task create', {
uuid: user._id,
hitType: 'event',
@@ -888,7 +888,7 @@ api.scoreTask = {
}
// Track when new users (first 7 days) score tasks
if (moment().diff(user.auth.timestamps.created, 'days') < 7 && user.flags.welcomed) {
if (moment().diff(user.auth.timestamps.created, 'days') < 7) {
res.analytics.track('task score', {
uuid: user._id,
hitType: 'event',