Skip to content

chore: cleanup asset events#21858

Merged
Prithpal-Sooriya merged 23 commits into
mainfrom
ASSETS-1253/cleanup-asset-events-v2
Oct 30, 2025
Merged

chore: cleanup asset events#21858
Prithpal-Sooriya merged 23 commits into
mainfrom
ASSETS-1253/cleanup-asset-events-v2

Conversation

@Prithpal-Sooriya

@Prithpal-Sooriya Prithpal-Sooriya commented Oct 29, 2025

Copy link
Copy Markdown
Contributor

Description

This removes events we are not tracking from here, as well as update and align some existing events to our schema.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/ASSETS-1253

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

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

Aligns analytics schema (renames/removals), strips unused event tracking across NFT/notifications/settings, adds CTA click tracking, updates FCM click payload, and adjusts tests accordingly.

  • Analytics schema:
    • Rename COLLECTIBLE_DETAILS_OPENEDNFT_DETAILS_OPENED, TOKEN_LIST_ITEM_PRESSEDTOKEN_LIST_ITEM_CLICKED in core/Analytics/MetaMetrics.events.ts and mappings.
    • Remove deprecated events (e.g., network switch modal shown/confirm, collectible removed, notifications settings/storage, NFT autodetection modal events, primary currency toggle) and associated exports.
  • NFT flows:
    • Track NFT_DETAILS_OPENED in UI/CollectibleModal and Views/NftDetails.
    • Remove tracking on NFT removal in Views/NftOptions and UI/NftGrid/NftGridItemActionSheet.
  • Notifications:
    • Add CTA click tracking in Views/Notifications/Details/Footers/AnnouncementCtaFooter.tsx (includes notification_id, notification_type, clicked_item).
    • Include notification in feature announcement modal footer state and types.
    • Update opt-in activation event payload: action_type="completed"; keep dismiss flow.
    • Remove metrics from feature announcement toggle, main toggle, and per-account toggle components.
    • FCM click analytics now reports notification_type (fallbacks from kind/data.kind/type) and passes deeplink and raw data.
  • Settings:
    • NFT autodetect setting now emits SETTINGS_UPDATED with nft_autodetection_enabled and removes legacy event keys; still updates user traits.
    • Remove tracking for primary currency toggle; keep current currency change tracking.
    • Simplify UI/SwitchCustomNetwork (remove metrics side effects).
  • Tests:
    • Update/clean tests to match new events and removed tracking (Notifications CTA/footer, FCM service analytics assertions, NFT autodetect settings, opt-in hooks, etc.).

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

@Prithpal-Sooriya Prithpal-Sooriya requested review from a team as code owners October 29, 2025 14:47
@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.

juanmigdr
juanmigdr previously approved these changes Oct 29, 2025

@juanmigdr juanmigdr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@Prithpal-Sooriya Prithpal-Sooriya force-pushed the ASSETS-1253/cleanup-asset-events-v2 branch from 8bd7923 to 8daeb49 Compare October 30, 2025 10:47
@sonarqubecloud

Copy link
Copy Markdown

@vinnyhoward vinnyhoward 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.

LGMT!

@Prithpal-Sooriya Prithpal-Sooriya added this pull request to the merge queue Oct 30, 2025
Merged via the queue into main with commit f6bd420 Oct 30, 2025
148 of 150 checks passed
@Prithpal-Sooriya Prithpal-Sooriya deleted the ASSETS-1253/cleanup-asset-events-v2 branch October 30, 2025 20:05
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 30, 2025
@metamaskbot metamaskbot added the release-7.59.0 Issue or pull request that will be included in release 7.59.0 label Oct 30, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.59.0 Issue or pull request that will be included in release 7.59.0 size-M team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants