fix(emails): send split-test mailings for social reg accounts

This commit is contained in:
Sabe Jones
2019-03-05 14:55:45 -06:00
parent b7797b3e6c
commit e6c3d00665
2 changed files with 13 additions and 5 deletions

View File

@@ -129,14 +129,16 @@ function _setUpNewUser (user) {
user.preferences.background = 'violet';
const testGroup = Math.random();
if (testGroup < 0.25) {
if (testGroup < 0.2) {
user._ABtests.welcomeEmailSplit = 'welcome-v2';
} else if (testGroup < 0.5) {
} else if (testGroup < 0.4) {
user._ABtests.welcomeEmailSplit = 'welcome-v2b';
} else if (testGroup < 0.75) {
} else if (testGroup < 0.6) {
user._ABtests.welcomeEmailSplit = 'welcome-v2c';
} else {
} else if (testGroup < 0.8) {
user._ABtests.welcomeEmailSplit = 'welcome-v2d';
} else {
user._ABtests.welcomeEmailSplit = 'welcome';
}
if (user.registeredThrough === 'habitica-web') {