Skip to content

Commit

Permalink
Stepper: Ensure calypso_signup_start doesn't get recorded over and ov…
Browse files Browse the repository at this point in the history
…er / 50 times
  • Loading branch information
chriskmnds committed Sep 30, 2024
1 parent 7e593ec commit af7cbb2
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ export const useSignUpStartTracking = ( { flow }: Props ) => {
adTrackSignupStart( flowName );
}, [ isSignupFlow, flowName ] );

if ( ! isSignupFlow ) {
return;
}
useEffect( () => {
if ( ! isSignupFlow ) {
return;
}

recordSignupStart( { flow: flowName, ref, optionalProps: extraProps || {} } );
recordSignupStart( { flow: flowName, ref, optionalProps: extraProps || {} } );
}, [ isSignupFlow, flowName, ref, extraProps ] );
};

0 comments on commit af7cbb2

Please sign in to comment.