mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
fix(emails): send split-test mailings for social reg accounts
This commit is contained in:
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user