mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-24 20:11:04 +00:00
Add onboarding-flow in "register" and "user-registered" events (#15651)
* onboarding-flow in register event * onboarding-flow in user-registered event * fix typos GitOrigin-RevId: aff8a7157062db0ec1c99499353a7c08eaa7b8b6
This commit is contained in:
parent
3ff58aa318
commit
9ce9b2c937
2 changed files with 9 additions and 1 deletions
|
@ -67,8 +67,9 @@ module.exports = HomeController = {
|
||||||
|
|
||||||
return res.render('external/home/v2', {
|
return res.render('external/home/v2', {
|
||||||
designSystemUpdatesVariant: designSystemUpdatesAssignment.variant,
|
designSystemUpdatesVariant: designSystemUpdatesAssignment.variant,
|
||||||
|
onboardingFlowVariant: onboardingFlowAssignment.variant,
|
||||||
hideNewsletterCheckbox:
|
hideNewsletterCheckbox:
|
||||||
onboardingFlowAssignment?.variant === 'token-confirmation-odc',
|
onboardingFlowAssignment.variant === 'token-confirmation-odc',
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
return res.redirect('/login')
|
return res.redirect('/login')
|
||||||
|
|
|
@ -51,10 +51,17 @@ async function recordRegistrationEvent(user) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onboardingFlowAssignment =
|
||||||
|
await SplitTestHandler.promises.getAssignmentForUser(
|
||||||
|
user._id,
|
||||||
|
'onboarding-flow'
|
||||||
|
)
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const segmentation = {
|
const segmentation = {
|
||||||
'home-registration': 'default',
|
'home-registration': 'default',
|
||||||
'split-test-design-system-updates': designSystemUpdatesAssignment.variant,
|
'split-test-design-system-updates': designSystemUpdatesAssignment.variant,
|
||||||
|
'onboarding-flow': onboardingFlowAssignment.variant,
|
||||||
}
|
}
|
||||||
if (user.thirdPartyIdentifiers && user.thirdPartyIdentifiers.length > 0) {
|
if (user.thirdPartyIdentifiers && user.thirdPartyIdentifiers.length > 0) {
|
||||||
segmentation.provider = user.thirdPartyIdentifiers[0].providerId
|
segmentation.provider = user.thirdPartyIdentifiers[0].providerId
|
||||||
|
|
Loading…
Reference in a new issue