mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Implement onboarding video tour split test (#11889)
* Implement onboarding video tour split test: - Add split test infrastructure - Create new `OnboardingVideoTourModal` component - Place the component inside the editor pug template with a split test * add event segmentation for `onboarding-video-tour-close-button-click` event: 1. video: `first` | `second` 2. firstVideoWatchingTimeInSecond: total time watching first video 2. secondVideoWatchingTimeInSecond: total time watching second video (0 if skipped) * add event segmentation for: 1. `onboarding-video-tour-dismiss-button-click` 2. `onboarding-video-tour-next-button-click` 3. `onboarding-video-tour-done-button-click` with these key/value: 1. firstVideoWatchingTimeInSecond: total time watching first video 2. secondVideoWatchingTimeInSecond: total time watching second video (0 if skipped/not watched yet) * Use contentful to host video assets GitOrigin-RevId: 27a6f38d15d7a03b07455e216dda63d99983ca80
This commit is contained in:
@@ -1061,6 +1061,21 @@ const ProjectController = {
|
||||
}
|
||||
)
|
||||
},
|
||||
onboardingVideoTourAssignment(cb) {
|
||||
SplitTestHandler.getAssignment(
|
||||
req,
|
||||
res,
|
||||
'onboarding-video-tour',
|
||||
(error, assignment) => {
|
||||
// do not fail editor load if assignment fails
|
||||
if (error) {
|
||||
cb(null, { variant: 'default' })
|
||||
} else {
|
||||
cb(null, assignment)
|
||||
}
|
||||
}
|
||||
)
|
||||
},
|
||||
accessCheckForOldCompileDomainAssigment(cb) {
|
||||
SplitTestHandler.getAssignment(
|
||||
req,
|
||||
@@ -1133,6 +1148,7 @@ const ProjectController = {
|
||||
pdfjsAssignment,
|
||||
editorLeftMenuAssignment,
|
||||
richTextAssignment,
|
||||
onboardingVideoTourAssignment,
|
||||
}
|
||||
) => {
|
||||
if (err != null) {
|
||||
@@ -1240,6 +1256,12 @@ const ProjectController = {
|
||||
!userIsMemberOfGroupSubscription &&
|
||||
!userHasInstitutionLicence
|
||||
|
||||
const showOnboardingVideoTour =
|
||||
Features.hasFeature('saas') &&
|
||||
userId &&
|
||||
onboardingVideoTourAssignment.variant === 'active' &&
|
||||
req.session.justRegistered
|
||||
|
||||
const template =
|
||||
detachRole === 'detached'
|
||||
? 'project/editor_detached'
|
||||
@@ -1318,6 +1340,7 @@ const ProjectController = {
|
||||
useOpenTelemetry: Settings.useOpenTelemetryClient,
|
||||
showCM6SwitchAwaySurvey: Settings.showCM6SwitchAwaySurvey,
|
||||
richTextVariant: richTextAssignment.variant,
|
||||
showOnboardingVideoTour,
|
||||
})
|
||||
timer.done()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user