Skip to content

chore: track x/tweet card taps in Market Insights cp-7.78.0#30453

Merged
zone-live merged 2 commits into
mainfrom
TSA-561-track-x-clicks-in-market-insights
May 20, 2026
Merged

chore: track x/tweet card taps in Market Insights cp-7.78.0#30453
zone-live merged 2 commits into
mainfrom
TSA-561-track-x-clicks-in-market-insights

Conversation

@zone-live

@zone-live zone-live commented May 20, 2026

Copy link
Copy Markdown
Contributor

Description

Tracks when a user taps a tweet card in the Market Insights view by firing the existing MARKET_INSIGHTS_INTERACTION event with the source_url set to the tweet's URL.
No segment-schema changes were needed.

Changelog

CHANGELOG entry: null

Related issues

Fixes:

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

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

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
Low risk: adds a single analytics call on tweet-card taps and updates a unit test; behavior change is limited to emitting an event before opening the URL.

Overview
Market Insights now tracks tweet-card taps by firing MetaMetricsEvents.MARKET_INSIGHTS_INTERACTION with interaction_type: 'source_click' and the tapped source_url before opening the link.

Tests were updated to assert the new analytics event is emitted when a tweet card is pressed.

Reviewed by Cursor Bugbot for commit 938efad. Bugbot is set up for automated code reviews on this repo. Configure here.

@zone-live zone-live added the team-social-ai Social & AI team label May 20, 2026
@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.

@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 20, 2026
@zone-live zone-live removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 20, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

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

E2E Test Selection:
The changes are limited to two files in the MarketInsightsView component:

  1. MarketInsightsView.tsx: The handleTweetPress callback was refactored to add analytics tracking (trackMarketInsightsInteraction('source_click', ...)) when a source URL is pressed. The URL safety check (isSafeUrl) is preserved, and the core behavior (opening the URL via Linking.openURL) is unchanged. The function was also moved to a different position in the file (after trackMarketInsightsInteraction is defined, since it now depends on it).

  2. MarketInsightsView.test.tsx: Unit test updated to assert the new analytics tracking call.

Why no E2E tags are needed:

  • No E2E tests reference MarketInsights directly (confirmed via grep)
  • The change is purely additive - adding analytics tracking to an existing URL press handler
  • No shared infrastructure, navigation, controllers, or Engine changes
  • No breaking changes to component behavior or API
  • The component is used in token details and Perps market details views, but the change doesn't affect rendering, navigation, or transaction flows
  • Risk is low: the only behavioral change is an additional analytics event being fired on tweet/source URL press

Performance Test Selection:
The change adds a single analytics tracking call to an existing URL press handler. This is not a performance-sensitive change - it doesn't affect rendering, list performance, data loading, or any critical user flows measured by performance tests.

View GitHub Actions results

@zone-live zone-live changed the title chore: track tweet card taps in Market Insights chore: track x/tweet card taps in Market Insights May 20, 2026
@sonarqubecloud

Copy link
Copy Markdown

@zone-live zone-live changed the title chore: track x/tweet card taps in Market Insights chore: track x/tweet card taps in Market Insights cp-7.78.0 May 20, 2026
@zone-live zone-live changed the title chore: track x/tweet card taps in Market Insights cp-7.78.0 chore: track x/tweet card taps in Market Insights cp-7.78.0 May 20, 2026
@zone-live zone-live enabled auto-merge May 20, 2026 15:53
@zone-live zone-live added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit d7d9e04 May 20, 2026
81 of 101 checks passed
@zone-live zone-live deleted the TSA-561-track-x-clicks-in-market-insights branch May 20, 2026 16:14
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.79.0 Issue or pull request that will be included in release 7.79.0 label May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.79.0 Issue or pull request that will be included in release 7.79.0 size-S team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants