diff --git a/src/analytics/Properties.tsx b/src/analytics/Properties.tsx index 1b7d2b84693..34fbb8f5c62 100644 --- a/src/analytics/Properties.tsx +++ b/src/analytics/Properties.tsx @@ -393,7 +393,7 @@ interface OnboardingEventsProperties { [OnboardingEvents.protect_wallet_copy_phrase]: undefined [OnboardingEvents.protect_wallet_complete]: undefined [OnboardingEvents.cya_button_press]: { - name: string + cardName: AdventureCardName position: number cardOrder: AdventureCardName[] } diff --git a/src/analytics/docs.ts b/src/analytics/docs.ts index d4705e8ccf7..a677bab3e1b 100644 --- a/src/analytics/docs.ts +++ b/src/analytics/docs.ts @@ -203,8 +203,8 @@ export const eventDocs: Record = { [OnboardingEvents.protect_wallet_help_dismiss]: ``, [OnboardingEvents.protect_wallet_copy_phrase]: ``, [OnboardingEvents.protect_wallet_complete]: ``, - [OnboardingEvents.cya_button_press]: ``, - [OnboardingEvents.cya_later]: ``, + [OnboardingEvents.cya_button_press]: `when one of the choose your adventure card is pressed. Properties include card name, position of the card (1-based index) and card order`, + [OnboardingEvents.cya_later]: `when "I'll explore later" is pressed`, [VerificationEvents.verification_start]: ``, [VerificationEvents.verification_complete]: ``, [VerificationEvents.verification_error]: ``, diff --git a/src/onboarding/ChooseYourAdventure.test.tsx b/src/onboarding/ChooseYourAdventure.test.tsx index 283d74c9cf4..3b570995d14 100644 --- a/src/onboarding/ChooseYourAdventure.test.tsx +++ b/src/onboarding/ChooseYourAdventure.test.tsx @@ -83,7 +83,7 @@ describe('ChooseYourAdventure', () => { }) expect(ValoraAnalytics.track).toHaveBeenLastCalledWith(OnboardingEvents.cya_button_press, { position: 1, - name: AdventureCardName.Dapp, + cardName: AdventureCardName.Dapp, cardOrder: expectedCardOrder, }) fireEvent.press(getByTestId('AdventureCard/1/chooseYourAdventure.options.add')) @@ -94,7 +94,7 @@ describe('ChooseYourAdventure', () => { expect(ValoraAnalytics.track).toHaveBeenLastCalledWith(OnboardingEvents.cya_button_press, { position: 2, - name: AdventureCardName.Add, + cardName: AdventureCardName.Add, cardOrder: expectedCardOrder, }) @@ -104,7 +104,7 @@ describe('ChooseYourAdventure', () => { }) expect(ValoraAnalytics.track).toHaveBeenLastCalledWith(OnboardingEvents.cya_button_press, { position: 3, - name: AdventureCardName.Learn, + cardName: AdventureCardName.Learn, cardOrder: expectedCardOrder, }) @@ -113,7 +113,7 @@ describe('ChooseYourAdventure', () => { expect(navigate).toHaveBeenLastCalledWith(Screens.Profile) expect(ValoraAnalytics.track).toHaveBeenLastCalledWith(OnboardingEvents.cya_button_press, { position: 4, - name: AdventureCardName.Profile, + cardName: AdventureCardName.Profile, cardOrder: expectedCardOrder, }) diff --git a/src/onboarding/ChooseYourAdventure.tsx b/src/onboarding/ChooseYourAdventure.tsx index 27f131954e6..2e0716b9c8e 100644 --- a/src/onboarding/ChooseYourAdventure.tsx +++ b/src/onboarding/ChooseYourAdventure.tsx @@ -107,7 +107,7 @@ function ChooseYourAdventure() { const onPress = () => { ValoraAnalytics.track(OnboardingEvents.cya_button_press, { position: index + 1, - name, + cardName: name, cardOrder, }) goToNextScreen()