chore(runway): cherry-pick feat: add marketing event for seedless users cp-7.72.0#28045
Conversation
…rs (#28015) <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** * This PR improves analytics and marketing-consent for seedless / social (OAuth) onboarding <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> ## **Changelog** <!-- If this PR is not End-User-Facing and should not show up in the CHANGELOG, you can choose to either: 1. Write `CHANGELOG entry: null` 2. Label with `no-changelog` If this PR is End-User-Facing, please write a short User-Facing description in the past tense like: `CHANGELOG entry: Added a new tab for users to see their NFTs` `CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker` (This helps the Release Engineer do their job more quickly and accurately) --> CHANGELOG entry: Improved analytics consistency during social login onboarding. ## **Related issues** Fixes: ## **Manual testing steps** ```gherkin Feature: my feature name Scenario: Social new user completes password and reaches success Given seedless / social onboarding is enabled And the user signs in with Google or Apple as a new user When the user sets a password on Choose Password and submits Then the app navigates to onboarding success And marketing preference is sent to the auth API according to the checkbox And analytics receives preference for marketing consent. ``` ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Adds new analytics tracking and user-trait updates in the OAuth onboarding success path, including an awaited call that could impact timing or failure behavior before navigation. > > **Overview** > Adds explicit MetaMetrics instrumentation for *seedless/social (OAuth) onboarding* on the `ChoosePassword` success path: emits `ANALYTICS_PREFERENCE_SELECTED` with marketing-consent + `account_type` (derived from the OAuth `provider`) and updates the user profile via `addTraitsToUser` with device/user settings metadata and configured chain IDs. > > Updates `ChoosePassword` tests to mock the expanded analytics API (`identify`, `addTraitsToUser`, event builder output), pass `provider` in OAuth route params, and assert the new tracking/trait calls occur when completing OAuth wallet creation. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 24d270a. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key findings:
No other tags are directly impacted - the change is isolated to analytics tracking during onboarding password creation, not affecting confirmations, trading, networks, or other features. Performance Test Selection: |
|
|
✅ E2E Fixture Validation — Schema is up to date |



Description
(OAuth) onboarding
Changelog
CHANGELOG entry: Improved analytics consistency during social login
onboarding.
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Docs and MetaMask Mobile
Coding
Standards.
if applicable
guidelines).
Not required for external contributors.
Pre-merge reviewer checklist
app, test code being changed).
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
Note
Medium Risk
Adds new analytics tracking and user-trait updates in the OAuth
onboarding success path, including an awaited call that could impact
timing or failure behavior before navigation.
Overview
Adds explicit MetaMetrics instrumentation for seedless/social (OAuth)
onboarding on the
ChoosePasswordsuccess path: emitsANALYTICS_PREFERENCE_SELECTEDwith marketing-consent +account_type(derived from the OAuth
provider) and updates the user profile viaaddTraitsToUserwith device/user settings metadata and configuredchain IDs.
Updates
ChoosePasswordtests to mock the expanded analytics API(
identify,addTraitsToUser, event builder output), passproviderin OAuth route params, and assert the new tracking/trait calls occur
when completing OAuth wallet creation.
Written by Cursor
Bugbot for commit
24d270a. Configure
here.