Files
frontend-app-authn/src/register/data/optimizelyExperiment/track.js
Syed Sajjad Hussain Shah 90f650ce3e feat: add multi step registration eventing (#1226)
* feat: implement multi step registration experiment

* feat: add multi step registration eventing
2024-04-18 11:09:32 +05:00

57 lines
2.2 KiB
JavaScript

import { sendTrackEvent } from '@edx/frontend-platform/analytics';
export const eventNames = {
multiStepRegistrationStep1Viewed: 'edx.bi.user.multistepregistration.step1.viewed',
multiStepRegistrationStep2Viewed: 'edx.bi.user.multistepregistration.step2.viewed',
multiStepRegistrationStep3Viewed: 'edx.bi.user.multistepregistration.step3.viewed',
multiStepRegistrationStep1SubmitBtnClicked: 'edx.bi.user.registration.step1.submit.click',
multiStepRegistrationStep2SubmitBtnClicked: 'edx.bi.user.registration.step2.submit.click',
multiStepRegistrationStep3SubmitBtnClicked: 'edx.bi.user.registration.step3.submit.click',
multiStepRegistrationFormSubmitBtnClicked: 'edx.bi.user.registration.form.submit.click',
multiStepRegistrationSSOBtnClicked: 'edx.bi.user.registration.sso.btn.click',
};
export const trackMultiStepRegistrationStep1Viewed = (expVariation) => {
sendTrackEvent(eventNames.multiStepRegistrationStep1Viewed, {
variation: expVariation,
});
};
export const trackMultiStepRegistrationStep2Viewed = (expVariation) => {
sendTrackEvent(eventNames.multiStepRegistrationStep2Viewed, {
variation: expVariation,
});
};
export const trackMultiStepRegistrationStep3Viewed = () => {
sendTrackEvent(eventNames.multiStepRegistrationStep3Viewed, {});
};
export const trackMultiStepRegistrationStep1SubmitBtnClicked = (expVariation) => {
sendTrackEvent(eventNames.multiStepRegistrationStep1SubmitBtnClicked, {
variation: expVariation,
});
};
export const trackMultiStepRegistrationStep2SubmitBtnClicked = (expVariation) => {
sendTrackEvent(eventNames.multiStepRegistrationStep2SubmitBtnClicked, {
variation: expVariation,
});
};
export const trackMultiStepRegistrationStep3SubmitBtnClicked = () => {
sendTrackEvent(eventNames.multiStepRegistrationStep3SubmitBtnClicked, {});
};
export const trackMultiStepRegistrationFormSubmitBtnClicked = (expVariation) => {
sendTrackEvent(eventNames.multiStepRegistrationFormSubmitBtnClicked, {
variation: expVariation,
});
};
export const trackMultiStepRegistrationSSOBtnClicked = (expVariation) => {
sendTrackEvent(eventNames.multiStepRegistrationSSOBtnClicked, {
variation: expVariation,
});
};