Analytics: clean up old A/B test code & add username verify flag (#10754)

* chore(analytics): clean up old A/B test code & add username verify

* fix(lint): more AB cleanup
This commit is contained in:
Sabe Jones
2018-10-13 13:03:20 -05:00
committed by GitHub
parent c64ea0a9a9
commit 25ed05ab0a
7 changed files with 4 additions and 48 deletions

View File

@@ -124,25 +124,6 @@ function _setUpNewUser (user) {
let taskTypes;
let iterableFlags = user.flags.toObject();
// A/B test 2017-05-11: Can we encourage people to join Guilds with a pester modal?
let testGroup = Math.random();
if (testGroup < 0.1) {
user._ABtests.guildReminder = '20170511_noGuildReminder'; // control group, don't pester about Guilds
user._ABtests.counter = -1;
} else if (testGroup < 0.235) {
user._ABtests.guildReminder = '20170511_text1timing1'; // first sample text, show after two clicks
user._ABtests.counter = 0;
} else if (testGroup < 0.46) {
user._ABtests.guildReminder = '20170511_text2timing1'; // second sample text, show after two clicks
user._ABtests.counter = 0;
} else if (testGroup < 0.685) {
user._ABtests.guildReminder = '20170511_text1timing2'; // first sample text, show after five clicks
user._ABtests.counter = 0;
} else {
user._ABtests.guildReminder = '20170511_text2timing2'; // second sample text, show after five clicks
user._ABtests.counter = 0;
}
user.items.quests.dustbunnies = 1;
user.purchased.background.violet = true;
user.preferences.background = 'violet';