fix: A/B test cookie (#313)
This commit is contained in:
@@ -6,6 +6,7 @@ import { Redirect } from 'react-router-dom';
|
||||
import { getConfig } from '@edx/frontend-platform';
|
||||
|
||||
import { WELCOME_PAGE } from '../data/constants';
|
||||
import { setCookie } from '../data/utils';
|
||||
|
||||
function RedirectLogistration(props) {
|
||||
const {
|
||||
@@ -25,6 +26,7 @@ function RedirectLogistration(props) {
|
||||
}
|
||||
|
||||
if (redirectToWelcomePage) {
|
||||
setCookie('van-504-returning-user', true);
|
||||
// use this component to redirect WelcomePage after successful registration
|
||||
// return <Redirect to={WELCOME_PAGE} />;
|
||||
const registrationResult = { redirectUrl: finalRedirectUrl, success };
|
||||
|
||||
@@ -32,7 +32,7 @@ import {
|
||||
DEFAULT_STATE, LOGIN_PAGE, PENDING_STATE, REGISTER_PAGE, VALID_EMAIL_REGEX,
|
||||
} from '../data/constants';
|
||||
import {
|
||||
getTpaProvider, getTpaHint, updatePathWithQueryParams, getAllPossibleQueryParam, setSurveyCookie, setCookie,
|
||||
getTpaProvider, getTpaHint, updatePathWithQueryParams, getAllPossibleQueryParam, setSurveyCookie,
|
||||
} from '../data/utils';
|
||||
|
||||
class RegistrationPage extends React.Component {
|
||||
@@ -446,7 +446,6 @@ class RegistrationPage extends React.Component {
|
||||
|
||||
if (this.props.registrationResult.success) {
|
||||
setSurveyCookie('register');
|
||||
setCookie('van-504-returning-user', true);
|
||||
// Fire optimizely event
|
||||
if (this.state.optimizelyExperimentName !== 'progressive_profiling_phase1') {
|
||||
window.optimizely = window.optimizely || [];
|
||||
|
||||
Reference in New Issue
Block a user