Drop Cap A/B Tests: v2 (#12759)

* drop cap ab test: enroll all web users, 50/50

* update tests

* fix lint
This commit is contained in:
Matteo Pagliazzi
2020-11-03 21:19:09 +01:00
committed by GitHub
parent b17c9a33a5
commit 14714f9e1c
3 changed files with 8 additions and 31 deletions

View File

@@ -464,12 +464,8 @@ async function scoreTask (user, task, direction, req, res) {
user,
});
const isEnrolledInDropCapTest = user._ABtests.dropCapNotif
&& user._ABtests.dropCapNotif !== 'drop-cap-notif-not-enrolled';
// Track when new users (first 7 days) score tasks
// or if they're enrolled in the Drop Cap A/B Test
if (moment().diff(user.auth.timestamps.created, 'days') < 7 || isEnrolledInDropCapTest) {
if (moment().diff(user.auth.timestamps.created, 'days') < 7) {
res.analytics.track('task score', {
uuid: user._id,
hitType: 'event',