mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-05-24 06:35:37 +00:00
fix(ABtest): record test group at registration
This commit is contained in:
parent
f1f120498c
commit
b641414a56
2 changed files with 2 additions and 0 deletions
|
|
@ -207,6 +207,7 @@ async function registerLocal (req, res, { isV3 = false }) {
|
|||
.catch(err => logger.error(err));
|
||||
|
||||
if (!existingUser) {
|
||||
savedUser._ABtests['20200625_drops'] = '12345678'.indexOf(savedUser._id.slice(0, 1)) !== -1 ? 'boosted' : 'control';
|
||||
res.analytics.track('register', {
|
||||
category: 'acquisition',
|
||||
type: 'local',
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ export async function loginSocial (req, res) { // eslint-disable-line import/pre
|
|||
}
|
||||
|
||||
if (!existingUser) {
|
||||
savedUser._ABtests['20200625_drops'] = '12345678'.indexOf(savedUser._id.slice(0, 1)) !== -1 ? 'boosted' : 'control';
|
||||
res.analytics.track('register', {
|
||||
category: 'acquisition',
|
||||
type: network,
|
||||
|
|
|
|||
Loading…
Reference in a new issue