Skip to content

Commit

Permalink
calypso_new_user_site_creation: Add more tracking props (#95456)
Browse files Browse the repository at this point in the history
  • Loading branch information
escapemanuele authored Oct 17, 2024
1 parent 5ee0005 commit 4fca5b7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/landing/stepper/hooks/use-record-signup-complete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const useRecordSignupComplete = ( flow: string | null ) => {
hasPaidDomainItem && domainCartItem ? isDomainTransfer( domainCartItem ) : undefined,
signupDomainOrigin: signupDomainOrigin ?? SIGNUP_DOMAIN_ORIGIN.NOT_SET,
framework: 'stepper',
isNewishUser,
},
true
);
Expand Down
10 changes: 9 additions & 1 deletion client/lib/analytics/signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export function recordSignupComplete(
signupDomainOrigin,
elapsedTimeSinceStart = null,
framework = 'start',
isNewishUser,
},
now
) {
Expand Down Expand Up @@ -82,6 +83,7 @@ export function recordSignupComplete(
isMapping,
signupDomainOrigin,
framework,
isNewishUser,
},
true
);
Expand Down Expand Up @@ -124,7 +126,13 @@ export function recordSignupComplete(
const device = resolveDeviceTypeByViewPort();

// Tracks
recordTracksEvent( 'calypso_new_user_site_creation', { flow, device, framework } );
recordTracksEvent( 'calypso_new_user_site_creation', {
flow,
device,
framework,
is_new_user: isNewUser,
is_newish_user: isNewishUser,
} );
// Google Analytics
gaRecordEvent( 'Signup', 'calypso_new_user_site_creation' );
}
Expand Down
1 change: 1 addition & 0 deletions client/signup/main.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -592,6 +592,7 @@ class Signup extends Component {
isTransfer: isTransfer,
signupDomainOrigin: signupDomainOriginValue,
framework: 'start',
isNewishUser,
} );
}
};
Expand Down

0 comments on commit 4fca5b7

Please sign in to comment.