-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stepper: Handle
calypso_signup_actions_complete_step
tracking (#94528)
- Loading branch information
1 parent
e9b7ca5
commit eb47bbe
Showing
5 changed files
with
82 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
client/landing/stepper/declarative-flow/internals/analytics/record-step-complete.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import { recordTracksEvent } from '@automattic/calypso-analytics'; | ||
import { resolveDeviceTypeByViewPort } from '@automattic/viewport'; | ||
import { STEPPER_TRACKS_EVENT_STEP_COMPLETE } from 'calypso/landing/stepper/constants'; | ||
|
||
export interface RecordStepCompleteProps { | ||
flow: string; | ||
step: string; | ||
optionalProps?: Record< string, string | number | null >; | ||
} | ||
|
||
const recordStepComplete = ( { flow, step, optionalProps }: RecordStepCompleteProps ) => { | ||
recordTracksEvent( STEPPER_TRACKS_EVENT_STEP_COMPLETE, { | ||
flow, | ||
step, | ||
device: resolveDeviceTypeByViewPort(), | ||
...optionalProps, | ||
} ); | ||
}; | ||
|
||
export default recordStepComplete; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters