Skip to content

chore(runway): cherry-pick feat: MUSD-454 add quick convert event tracking cp-7.70.0#27455

Merged
chloeYue merged 1 commit into
release/7.70.0from
runway-cherry-pick-7.70.0-1773348280
Mar 12, 2026
Merged

chore(runway): cherry-pick feat: MUSD-454 add quick convert event tracking cp-7.70.0#27455
chloeYue merged 1 commit into
release/7.70.0from
runway-cherry-pick-7.70.0-1773348280

Conversation

@runway-github

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

Copy link
Copy Markdown
Contributor

Description

Changes:

  • Adds Segment event tracking for the mUSD Quick Convert flow
  • Enriches generic Transaction* events for musdConversion
    transactions
  • Adds confirmation_source to differentiate between the "Max" convert
    bottom sheet and custom amount confirmations
  • Adds is_max which is true when "Max" conversion flow is used or
    when custom amount is used and user clicks "Max" button in percentage
    button row
    • Adds mUSD quote tracking data

Events

Event Type Location Description
mUSD Quick Convert Screen Viewed New standalone event
MusdQuickConvertView (on mount) Fires when the quick convert token
list screen is viewed
mUSD Bonus Terms of Use Pressed New standalone event
MusdQuickConvertView (quick_convert_home_screen),
EarnMusdConversionEducationView (conversion_education_screen),
useMusdConversionNavbar (custom_amount_navbar), PercentageRow
(percentage_row) Fires when user presses the bonus terms of use
link; location property differentiates the source
mUSD Quick Convert Token Row Button Clicked New standalone event
MusdQuickConvertView Fires on "Max" or "Edit" button tap; includes
button_action, redirects_to, asset details
confirmation_source New property on Transaction* events
useMusdConversionConfirmationMetrics
'quick_convert_max_bottom_sheet_confirmation_screen' or
'custom_amount_screen' — only attached to musdConversion
transactions
is_max New property on Transaction* events
useMusdConversionConfirmationMetrics Derived from
TransactionPayController.isMaxAmount — only attached to
musdConversion transactions
Quote tracking data New properties on Transaction* events
useMusdConversionConfirmationMetrics Standardized quote/pay data via
getMusdConversionQuoteTrackingData — only attached to musdConversion
transactions

Changelog

CHANGELOG entry: Added Segment event tracking for mUSD Quick Convert
flow and enrich generic Transaction* events for mUSD conversion
transactions

Related issues

Fixes: MUSD-454: Add segment events for Quick Convert
flow

Manual testing steps

Feature: mUSD Quick Convert Segment event tracking

  Scenario: user views the quick convert screen
    Given user navigates to the mUSD Quick Convert screen

    When the screen mounts
    Then "mUSD Quick Convert Screen Viewed" event fires with location "quick_convert_home_screen"

  Scenario: user taps Max on a token row
    Given user is on the mUSD Quick Convert screen with convertible tokens

    When user taps "Max" on a token row
    Then "mUSD Quick Convert Token Row Button Clicked" event fires with button_action "max" and redirects_to "quick_convert_max_bottom_sheet_confirmation_screen"

  Scenario: user taps Edit on a token row
    Given user is on the mUSD Quick Convert screen with convertible tokens

    When user taps the edit icon on a token row
    Then "mUSD Quick Convert Token Row Button Clicked" event fires with button_action "custom" and redirects_to "custom_amount_screen"

  Scenario: user taps "Terms apply" link on the quick convert screen
    Given user is on a screen displaying the mUSD bonus "Terms apply" link

    When user taps "Terms apply"
    Then "mUSD Bonus Terms of Use Pressed" event fires with the location of the current screen

  Scenario: user confirms a max mUSD conversion
    Given user is on the max convert bottom sheet confirmation

    When user taps "Convert"
    Then "Transaction Approved" event includes confirmation_source "quick_convert_max_bottom_sheet_confirmation_screen", "is_max: true", and quote tracking data

  Scenario: user confirms a custom amount mUSD conversion
    Given user is on the custom amount conversion screen

    When user taps "Convert"
    Then "Transaction Approved" event includes confirmation_source "custom_amount_screen", "is_max: false"

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 MetaMetrics events and confirmation-metric dispatches across
mUSD conversion/confirmation screens; while behavior is mostly
observational, it touches confirmations flow and transaction status
tracking and could affect analytics payloads or introduce unintended
side effects if hooks fire unexpectedly.

Overview
Adds MetaMetrics tracking for the mUSD Quick Convert flow,
including MUSD_QUICK_CONVERT_SCREEN_VIEWED,
MUSD_QUICK_CONVERT_TOKEN_ROW_BUTTON_CLICKED (Max/Edit), and
MUSD_BONUS_TERMS_OF_USE_PRESSED with location/context properties.

Introduces a shared analytics utility
(getMusdConversionQuoteTrackingData + deepSnakeCaseKeys) and
refactors useMusdConversionStatus to use it when emitting
MUSD_CONVERSION_STATUS_UPDATED, standardizing quote-derived
properties.

Enriches confirmation metrics for musdConversion by adding a new
useMusdConversionConfirmationMetrics hook (wired into
MusdConversionInfoRoot) that dispatches confirmation_source,
is_max, and select quote fields into confirmationMetrics. Tests are
updated/added accordingly, and EVENT_LOCATIONS/MetaMetricsEvents are
extended to support the new instrumentation.

Written by Cursor
Bugbot
for commit
6e2e686. This will update automatically
on new commits. Configure
here.

[15edc39](https://github.com/MetaMask/metamask-mobile/commit/15edc39daf4c59b69cd269295d718b3068c967b3)

…cking (#27305)

<!--
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**
### Changes:
- Adds Segment event tracking for the mUSD Quick Convert flow
- Enriches generic `Transaction*` events for `musdConversion`
transactions
- Adds `confirmation_source` to differentiate between the "Max" convert
bottom sheet and custom amount confirmations
- Adds `is_max` which is `true` when "Max" conversion flow is used or
when custom amount is used and user clicks "Max" button in percentage
button row
  - Adds mUSD quote tracking data 

### Events
| Event | Type | Location | Description |
|---|---|---|---|
| `mUSD Quick Convert Screen Viewed` | New standalone event |
`MusdQuickConvertView` (on mount) | Fires when the quick convert token
list screen is viewed |
| `mUSD Bonus Terms of Use Pressed` | New standalone event |
`MusdQuickConvertView` (`quick_convert_home_screen`),
`EarnMusdConversionEducationView` (`conversion_education_screen`),
`useMusdConversionNavbar` (`custom_amount_navbar`), `PercentageRow`
(`percentage_row`) | Fires when user presses the bonus terms of use
link; `location` property differentiates the source |
| `mUSD Quick Convert Token Row Button Clicked` | New standalone event |
`MusdQuickConvertView` | Fires on "Max" or "Edit" button tap; includes
`button_action`, `redirects_to`, asset details |
| `confirmation_source` | New property on `Transaction*` events |
`useMusdConversionConfirmationMetrics` |
`'quick_convert_max_bottom_sheet_confirmation_screen'` or
`'custom_amount_screen'` — only attached to `musdConversion`
transactions |
| `is_max` | New property on `Transaction*` events |
`useMusdConversionConfirmationMetrics` | Derived from
`TransactionPayController.isMaxAmount` — only attached to
`musdConversion` transactions |
| Quote tracking data | New properties on `Transaction*` events |
`useMusdConversionConfirmationMetrics` | Standardized quote/pay data via
`getMusdConversionQuoteTrackingData` — only attached to `musdConversion`
transactions |

<!--
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: Added Segment event tracking for mUSD Quick Convert
flow and enrich generic Transaction* events for mUSD conversion
transactions

## **Related issues**

Fixes: [MUSD-454: Add segment events for Quick Convert
flow](https://consensyssoftware.atlassian.net/browse/MUSD-454)

## **Manual testing steps**

```gherkin
Feature: mUSD Quick Convert Segment event tracking

  Scenario: user views the quick convert screen
    Given user navigates to the mUSD Quick Convert screen

    When the screen mounts
    Then "mUSD Quick Convert Screen Viewed" event fires with location "quick_convert_home_screen"

  Scenario: user taps Max on a token row
    Given user is on the mUSD Quick Convert screen with convertible tokens

    When user taps "Max" on a token row
    Then "mUSD Quick Convert Token Row Button Clicked" event fires with button_action "max" and redirects_to "quick_convert_max_bottom_sheet_confirmation_screen"

  Scenario: user taps Edit on a token row
    Given user is on the mUSD Quick Convert screen with convertible tokens

    When user taps the edit icon on a token row
    Then "mUSD Quick Convert Token Row Button Clicked" event fires with button_action "custom" and redirects_to "custom_amount_screen"

  Scenario: user taps "Terms apply" link on the quick convert screen
    Given user is on a screen displaying the mUSD bonus "Terms apply" link

    When user taps "Terms apply"
    Then "mUSD Bonus Terms of Use Pressed" event fires with the location of the current screen

  Scenario: user confirms a max mUSD conversion
    Given user is on the max convert bottom sheet confirmation

    When user taps "Convert"
    Then "Transaction Approved" event includes confirmation_source "quick_convert_max_bottom_sheet_confirmation_screen", "is_max: true", and quote tracking data

  Scenario: user confirms a custom amount mUSD conversion
    Given user is on the custom amount conversion screen

    When user taps "Convert"
    Then "Transaction Approved" event includes confirmation_source "custom_amount_screen", "is_max: false"
```

## **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 MetaMetrics events and confirmation-metric dispatches across
mUSD conversion/confirmation screens; while behavior is mostly
observational, it touches confirmations flow and transaction status
tracking and could affect analytics payloads or introduce unintended
side effects if hooks fire unexpectedly.
> 
> **Overview**
> Adds **MetaMetrics tracking for the mUSD Quick Convert flow**,
including `MUSD_QUICK_CONVERT_SCREEN_VIEWED`,
`MUSD_QUICK_CONVERT_TOKEN_ROW_BUTTON_CLICKED` (Max/Edit), and
`MUSD_BONUS_TERMS_OF_USE_PRESSED` with location/context properties.
> 
> Introduces a shared analytics utility
(`getMusdConversionQuoteTrackingData` + `deepSnakeCaseKeys`) and
refactors `useMusdConversionStatus` to use it when emitting
`MUSD_CONVERSION_STATUS_UPDATED`, standardizing quote-derived
properties.
> 
> Enriches **confirmation metrics for `musdConversion`** by adding a new
`useMusdConversionConfirmationMetrics` hook (wired into
`MusdConversionInfoRoot`) that dispatches `confirmation_source`,
`is_max`, and select quote fields into `confirmationMetrics`. Tests are
updated/added accordingly, and `EVENT_LOCATIONS`/`MetaMetricsEvents` are
extended to support the new instrumentation.
> 
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
6e2e686. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
@runway-github runway-github Bot requested review from a team as code owners March 12, 2026 20:44
@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 12, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - base branch is not main (base: release/7.70.0)

All E2E tests pre-selected.

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 merged commit c60cf6d into release/7.70.0 Mar 12, 2026
192 of 196 checks passed
@chloeYue chloeYue deleted the runway-cherry-pick-7.70.0-1773348280 branch March 12, 2026 21:49
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

size-XL 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