Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Analytics] Token Metadata #1803

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

BrodyHughes
Copy link
Member

@BrodyHughes BrodyHughes commented Jan 13, 2025

Fixes BX-1711

Changes

Created a new custom hook useTokenAnalytics to track token list quality metrics across different views in the app.

Hook Implementation

  • Takes a list of tokens and an entrypoint ('home' | 'send' | 'swap') as parameters
  • Tracks key metrics about token list quality:
    • Total number of tokens
    • Number of tokens missing prices
    • Number of tokens missing icons
    • Number of custom chain tokens
  • Uses refs and deep comparison to prevent duplicate analytics events during rerenders

POW:

Screen.Recording.2025-01-13.at.3.48.53.PM.mov

Reviewing:

  • Check the events are properly ingested into our analytics
  • Add logging to analytics hook to see logs locally if you want

Copy link

linear bot commented Jan 13, 2025

@BrodyHughes BrodyHughes marked this pull request as ready for review January 13, 2025 22:26
@BrodyHughes BrodyHughes changed the title Token Metadata Analytics Implementation [Analytics] Token Metadata Jan 14, 2025
@BrodyHughes BrodyHughes self-assigned this Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant