mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 15:17:25 +01:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user