refactor(perps): differentiate screen_type for perps screen viewed events #24308
+5
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.



Description
Previously, both
PerpsTabView(the Perps tab on wallet home screen) andPerpsHomeView(the dedicated Perps home screen) were using the samescreen_typevalue (homescreen) forPERPS_SCREEN_VIEWEDanalytics 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 screenperps_home- Used when viewing the full dedicated Perps home screenThe legacy
HOMESCREENvalue 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
Screenshots/Recordings
Before
N/A
After
N/A
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Separates analytics tracking to uniquely identify Perps views across app surfaces.
PerpsTabViewto emitPERPS_SCREEN_VIEWEDwithscreen_typewallet_home_perps_tabPerpsHomeViewto emitPERPS_SCREEN_VIEWEDwithscreen_typeperps_homeconstants/eventNames.tswithWALLET_HOME_PERPS_TABandPERPS_HOME; marksHOMESCREENas legacyWritten by Cursor Bugbot for commit a3fbd97. This will update automatically on new commits. Configure here.