fix: A/B test cookie (#313)

This commit is contained in:
Waheed Ahmed
2021-06-04 16:02:37 +05:00
committed by GitHub
parent ea51a584e7
commit e1aa5054ab
2 changed files with 3 additions and 2 deletions

View File

@@ -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 };

View File

@@ -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 || [];