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