Skip to content

feat(merklRewards): enhance analytics tracking for claim and tooltip interactions#25761

Merged
PatrykLucka merged 1 commit intomainfrom
update-claim-musd-segment-events
Feb 6, 2026
Merged

feat(merklRewards): enhance analytics tracking for claim and tooltip interactions#25761
PatrykLucka merged 1 commit intomainfrom
update-claim-musd-segment-events

Conversation

@PatrykLucka
Copy link
Copy Markdown
Contributor

@PatrykLucka PatrykLucka commented Feb 6, 2026

Description

Add analytics tracking for two Segment events in the mUSD claim bonus flow:

  1. mUSD Claim Bonus Button Clicked (updated) — now also fires from the ClaimOnLineaBottomSheet when the user taps "Continue" (action_type: claim_bonus) or dismisses via the close button (action_type: dismiss). The existing event from the asset overview "Claim" CTA is unchanged. Network/asset context is forwarded from the parent component via route params.

  2. Tooltip Opened (new trigger) — fires when the user taps the info (i) icon next to "Claimable bonus" in PendingMerklRewards, with tooltip_name: "Claim Bonus Info", location: "asset_overview", and experience: "MUSD_BONUS".

Both events use the non-deprecated useAnalytics hook and EVENT_NAME constants.

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: mUSD Claim Bonus Button Clicked from bottom sheet

  Scenario: User taps Continue in claim bottom sheet
    Given the user is on the mUSD asset overview with a claimable bonus displayed
    When the user taps the "Claim" button
    Then "mUSD Claim Bonus Button Clicked" fires with location "asset_overview" and action_type "claim_bonus"
    And the ClaimOnLinea bottom sheet opens
    When the user taps "Continue" in the bottom sheet
    Then "mUSD Claim Bonus Button Clicked" fires with location "claim_bonus_bottom_sheet" and action_type "claim_bonus"

  Scenario: User dismisses the claim bottom sheet
    Given the ClaimOnLinea bottom sheet is open
    When the user taps the close (X) button
    Then "mUSD Claim Bonus Button Clicked" fires with location "claim_bonus_bottom_sheet" and action_type "dismiss"
    And the bottom sheet closes
    
Feature: Tooltip Opened for claimable bonus info

  Scenario: User opens the claimable bonus tooltip
    Given the user is on the mUSD asset overview with a claimable bonus displayed
    When the user taps the info (i) icon next to "Claimable bonus"
    Then "Tooltip Opened" fires with tooltip_name "Claim Bonus Info", location "asset_overview", and experience "MUSD_BONUS"
    And the tooltip modal opens with bonus description text

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

Low Risk
Primarily adds analytics event tracking and constants, with minimal impact on user flow beyond extra side-effect calls; risk is limited to incorrect/missing analytics properties.

Overview
Adds additional analytics instrumentation to the mUSD Merkl rewards flow.

The claim-on-Linea bottom sheet now fires EVENT_NAME.MUSD_CLAIM_BONUS_BUTTON_CLICKED for both Continue (action_type: claim_bonus) and Close (action_type: dismiss), and ClaimMerklRewards forwards optional network/asset context via new analyticsContext route params (with a new CLAIM_BONUS_BOTTOM_SHEET location constant). PendingMerklRewards now tracks EVENT_NAME.TOOLTIP_OPENED when the “Claimable bonus” info icon is tapped, including tooltip metadata and experience, with tests updated to assert these events.

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

@PatrykLucka PatrykLucka self-assigned this Feb 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

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.

@PatrykLucka PatrykLucka marked this pull request as ready for review February 6, 2026 09:55
@PatrykLucka PatrykLucka requested a review from a team as a code owner February 6, 2026 09:55
@metamaskbot metamaskbot added the team-mobile-ux Mobile UX team label Feb 6, 2026
@github-actions github-actions bot added the size-M label Feb 6, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Feb 6, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: None (no tests recommended)
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are purely analytics additions to the Earn/MerklRewards feature components:

  1. ClaimMerklRewards.tsx - Passes analytics context to bottom sheet navigation
  2. ClaimOnLineaBottomSheet.tsx - Adds MUSD_CLAIM_BONUS_BUTTON_CLICKED event tracking for Continue/Close actions
  3. PendingMerklRewards.tsx - Adds TOOLTIP_OPENED event tracking for info button
  4. musdEvents.ts - Adds new event location constant

These are non-functional changes that:

  • Only add telemetry/analytics tracking
  • Don't modify any UI behavior or user flows
  • Don't touch any shared components
  • Are isolated to the Earn/MerklRewards feature
  • Have comprehensive unit test coverage for the new analytics

No E2E tests exist for the Earn/MerklRewards feature (confirmed via codebase search). The changes don't affect any flows that existing E2E tests would cover. Running E2E tests would not provide additional validation for these analytics-only changes.

Performance Test Selection:
These changes are purely analytics additions (event tracking) to the Earn/MerklRewards components. They don't affect UI rendering, data loading, state management, or any performance-critical paths. The analytics calls are lightweight event emissions that won't impact app responsiveness or render times. No performance tests are needed.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 6, 2026

@PatrykLucka PatrykLucka enabled auto-merge February 6, 2026 15:00
@PatrykLucka PatrykLucka added this pull request to the merge queue Feb 6, 2026
Merged via the queue into main with commit e8eddb1 Feb 6, 2026
78 checks passed
@PatrykLucka PatrykLucka deleted the update-claim-musd-segment-events branch February 6, 2026 15:29
@github-actions github-actions bot locked and limited conversation to collaborators Feb 6, 2026
@metamaskbot metamaskbot added the release-7.66.0 Issue or pull request that will be included in release 7.66.0 label Feb 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.66.0 Issue or pull request that will be included in release 7.66.0 size-M team-mobile-ux Mobile UX team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants