Skip to content

Commit

Permalink
Free Flow: Reset onboarding store when starting free flow (Automattic…
Browse files Browse the repository at this point in the history
  • Loading branch information
jeyip authored Dec 22, 2022
1 parent 072e20e commit 13b4368
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions client/landing/stepper/declarative-flow/free.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ const free: Flow = {
return translate( 'Free' );
},
useSteps() {
const { resetOnboardStore } = useDispatch( ONBOARD_STORE );

useEffect( () => {
if ( ! isEnabled( 'signup/free-flow' ) ) {
return window.location.assign( '/start/free' );
}
resetOnboardStore();
recordTracksEvent( 'calypso_signup_start', { flow: this.name } );
recordFullStoryEvent( 'calypso_signup_start_free', { flow: this.name } );
}, [] );
Expand Down

0 comments on commit 13b4368

Please sign in to comment.