Skip to content

chore(runway): cherry-pick feat: add marketing event for seedless users cp-7.72.0#28045

Merged
chloeYue merged 1 commit into
release/7.72.0from
runway-cherry-pick-7.72.0-1774620261
Mar 27, 2026
Merged

chore(runway): cherry-pick feat: add marketing event for seedless users cp-7.72.0#28045
chloeYue merged 1 commit into
release/7.72.0from
runway-cherry-pick-7.72.0-1774620261

Conversation

@runway-github

@runway-github runway-github Bot commented Mar 27, 2026

Copy link
Copy Markdown
Contributor

Description

  • This PR improves analytics and marketing-consent for seedless / social
    (OAuth) onboarding

Changelog

CHANGELOG entry: Improved analytics consistency during social login
onboarding.

Related issues

Fixes:

Manual testing steps

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

Before

After

Pre-merge author checklist

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.

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.

Written by Cursor
Bugbot
for commit
24d270a. Configure
here.

[79d02b8](https://github.com/MetaMask/metamask-mobile/commit/79d02b8a9607166856dbd166bc0e18bceeca79fb)

…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 -->
@runway-github runway-github Bot requested a review from a team as a code owner March 27, 2026 14:04
@github-actions

Copy link
Copy Markdown
Contributor

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.

@metamaskbot metamaskbot added the team-bots Bot team (for MetaMask Bot, Runway Bot, etc.) label Mar 27, 2026
@github-actions github-actions Bot added size-S risk-medium Moderate testing recommended · Possible bug introduction risk labels Mar 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform, SmokeAccounts
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: medium
  • AI Confidence: 82%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are in ChoosePassword/index.tsx, which is the password creation screen used during onboarding. The modification adds analytics tracking (metrics event + user traits) specifically during the OAuth/social login onboarding flow (when oauthLoginSuccess is true and a provider param is present).

Key findings:

  1. The ChoosePassword component is exercised by seedless/social login tests in tests/smoke/seedless/, which are tagged with SmokeWalletPlatform (confirmed in google-login-new-user.spec.ts).
  2. The ChoosePassword component is also part of the standard wallet creation onboarding flow, which is covered by SmokeWalletPlatform and SmokeAccounts.
  3. The analytics code is wrapped in a try/catch, so failures won't break the flow, but the new addTraitsToUser call and event tracking could affect timing or state during onboarding.
  4. The CreatePasswordView page object is used in seedless onboarding tests, confirming these tests exercise the changed code path.

SmokeWalletPlatform is selected because: (a) seedless/social login tests are tagged with it, (b) wallet creation analytics tracking is part of the wallet lifecycle analytics tested there.
SmokeAccounts is selected because: the ChoosePassword component is also used in account/wallet creation flows tested under this tag.

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:
The changes add analytics tracking (metrics event + addTraitsToUser) during the OAuth onboarding flow. These are async calls wrapped in try/catch and only execute once during wallet creation. They do not affect UI rendering performance, list rendering, login unlock times, or any hot paths measured by performance tests. No performance tests are warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
16 value mismatches detected (expected — fixture represents an existing user).
View details

@chloeYue chloeYue left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chloeYue chloeYue merged commit 3173493 into release/7.72.0 Mar 27, 2026
90 checks passed
@chloeYue chloeYue deleted the runway-cherry-pick-7.72.0-1774620261 branch March 27, 2026 15:08
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 27, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

risk-medium Moderate testing recommended · Possible bug introduction risk size-S team-bots Bot team (for MetaMask Bot, Runway Bot, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants