Skip to content

Conversation

@michalconsensys
Copy link
Contributor

@michalconsensys michalconsensys commented Jan 8, 2026

Description

Previously, both PerpsTabView (the Perps tab on wallet home screen) and PerpsHomeView (the dedicated Perps home screen) were using the same screen_type value (homescreen) for PERPS_SCREEN_VIEWED analytics events. This made it impossible to distinguish between the two screens in analytics dashboards.

This PR introduces two distinct screen type values:

  • wallet_home_perps_tab - Used when viewing the Perps tab within the wallet home screen
  • perps_home - Used when viewing the full dedicated Perps home screen

The legacy HOMESCREEN value is preserved with a comment indicating it should not be used for new implementations.

Changelog

CHANGELOG entry: null

Related issues

Fixes: https://consensyssoftware.atlassian.net/browse/TAT-1835

Manual testing steps

Feature: Perps screen analytics differentiation

  Scenario: user views Perps tab on wallet home
    Given user is on the wallet home screen
    When user taps on the Perps tab
    Then PERPS_SCREEN_VIEWED event is fired with screen_type: "wallet_home_perps_tab"

  Scenario: user navigates to Perps home screen
    Given user is on any screen in the app
    When user navigates to the Perps home screen (via manage balance or navigation)
    Then PERPS_SCREEN_VIEWED event is fired with screen_type: "perps_home"

Screenshots/Recordings

Before

N/A

After

N/A

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

Separates analytics tracking to uniquely identify Perps views across app surfaces.

  • Updates PerpsTabView to emit PERPS_SCREEN_VIEWED with screen_type wallet_home_perps_tab
  • Updates PerpsHomeView to emit PERPS_SCREEN_VIEWED with screen_type perps_home
  • Extends constants/eventNames.ts with WALLET_HOME_PERPS_TAB and PERPS_HOME; marks HOMESCREEN as legacy

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

…ents

Add distinct screen_type values for PERPS_SCREEN_VIEWED analytics:
- wallet_home_perps_tab: Perps tab on wallet home screen
- perps_home: Dedicated Perps home screen
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 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.

@metamaskbot metamaskbot added the team-perps Perps team label Jan 8, 2026
@michalconsensys michalconsensys marked this pull request as ready for review January 8, 2026 09:03
@michalconsensys michalconsensys requested a review from a team as a code owner January 8, 2026 09:03
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePerps
  • Risk Level: low
  • AI Confidence: 90%
click to see 🤖 AI reasoning details

The changes are limited to analytics event property values in the Perps feature:

  1. eventNames.ts: Added two new screen type values (WALLET_HOME_PERPS_TAB and PERPS_HOME) and marked the old HOMESCREEN as legacy
  2. PerpsHomeView.tsx: Changed analytics event from HOMESCREEN to PERPS_HOME
  3. PerpsTabView.tsx: Changed analytics event from HOMESCREEN to WALLET_HOME_PERPS_TAB

These are purely analytics/tracking changes that:

  • Don't modify any UI components or user-facing behavior
  • Don't change business logic or data flow
  • Are isolated to the Perps feature module
  • Only affect what analytics data is sent (screen type naming)

The SmokePerps tag is appropriate because:

  • The changes are in Perps-specific files
  • E2E tests exist for Perps functionality (perps-add-funds.spec.ts, perps-limit-long-fill.spec.ts, etc.)
  • Running these tests will verify the Perps feature still works correctly after the analytics changes

No other tags are needed since the changes don't affect any other features or core functionality.

View GitHub Actions results

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 8, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants