diff --git a/client/signup/controller.js b/client/signup/controller.js index 579f505862d8b4..8241e3c902c2b1 100644 --- a/client/signup/controller.js +++ b/client/signup/controller.js @@ -1,11 +1,11 @@ import config from '@automattic/calypso-config'; import page from '@automattic/calypso-router'; +import { isOnboardingFlow } from '@automattic/onboarding'; import { isEmpty } from 'lodash'; import { createElement } from 'react'; import store from 'store'; import { notFound } from 'calypso/controller'; import { recordPageView } from 'calypso/lib/analytics/page-view'; -import { loadExperimentAssignment } from 'calypso/lib/explat'; import { isWooOAuth2Client } from 'calypso/lib/oauth2-clients'; import { login } from 'calypso/lib/paths'; import { sectionify } from 'calypso/lib/route'; @@ -32,8 +32,6 @@ import { clearSignupDestinationCookie, getSignupCompleteFlowName, wasSignupCheckoutPageUnloaded, - setHasRedirectedForExperiment, - getHasRedirectedForExperiment, } from './storageUtils'; import { getStepUrl, @@ -241,23 +239,7 @@ export default { store.set( 'signup-locale', localeFromParams ); - const hasRedirected = - context.querystring?.includes( 'redirected_1220=true' ) || - // Check the URL as well because sometimes the context.querystring lags behind the URL. - new URLSearchParams( window.location.search ).has( 'redirected_1220' ) || - // Check session storage in case the query parma was omitted. - getHasRedirectedForExperiment(); - - const isOnboardingFlow = flowName === 'onboarding'; - - if ( isOnboardingFlow && ! hasRedirected ) { - await loadExperimentAssignment( 'calypso_signup_onboarding_aa_test' ); - setHasRedirectedForExperiment(); - - const stepperOnboardingExperimentAssignment = await loadExperimentAssignment( - 'calypso_signup_onboarding_stepper_flow_confidence_check_3' - ); - + if ( isOnboardingFlow( flowName ) ) { setReferrerPolicy(); let url = getStepUrl( @@ -266,10 +248,9 @@ export default { getStepSectionName( context.params ), localeFromParams ?? localeFromStore, null, - stepperOnboardingExperimentAssignment.variationName === 'stepper' ? '/setup' : '/start' + '/setup' ) + - '?redirected_1220=true' + - ( context.querystring ? '&' + context.querystring : '' ) + + ( context.querystring ? '?' + context.querystring : '' ) + ( context.hashstring ? '#' + context.hashstring : '' ); if ( document.referrer ) { diff --git a/client/signup/storageUtils.js b/client/signup/storageUtils.js index 81544f99460d9a..b914ae9509afde 100644 --- a/client/signup/storageUtils.js +++ b/client/signup/storageUtils.js @@ -61,21 +61,6 @@ export const setSignupCheckoutPageUnloaded = ( value ) => export const getSignupCompleteFlowName = () => ignoreFatalsForStorage( () => sessionStorage?.getItem( 'wpcom_signup_complete_flow_name' ) ); -export const getHasRedirectedForExperiment = () => - ignoreFatalsForStorage( () => - sessionStorage?.getItem( - 'wpcom_redirected_calypso_signup_onboarding_stepper_flow_confidence_check_2' - ) - ); - -export const setHasRedirectedForExperiment = () => - ignoreFatalsForStorage( () => - sessionStorage?.setItem( - 'wpcom_redirected_calypso_signup_onboarding_stepper_flow_confidence_check_2', - '1' - ) - ); - export const setSignupCompleteFlowName = ( value ) => ignoreFatalsForStorage( () => sessionStorage?.setItem( 'wpcom_signup_complete_flow_name', value )