Skip to content

Comments

feat: increase analytics coverage, also refactor the naming to group events#106

Open
raulriera wants to merge 4 commits intorefactor-new-serverfrom
feat-analytics-missing-areas
Open

feat: increase analytics coverage, also refactor the naming to group events#106
raulriera wants to merge 4 commits intorefactor-new-serverfrom
feat-analytics-missing-areas

Conversation

@raulriera
Copy link
Collaborator

This pull request introduces significant improvements to analytics tracking throughout the app and refactors how swap types are handled. The analytics system has been unified to use structured event types, and event tracking calls have been standardized. Additionally, swap transaction types are now more granular, distinguishing between purchases with reserves and with Phantom, which enhances both analytics and business logic clarity.

Track token info opens and swap transactions across the app. Adds analytics calls when token info is opened from deeplink, wallet, and Give (BalanceScreen, GiveViewModel). Introduces distinct SwapType cases (buyWithReserves, buyWithPhantom), surfaces an optional fee through the swap processing flow, and updates navigation paths to pass the appropriate swap type and fee (CurrencyInfoScreen, CurrencyBuyAmountScreen, CurrencySellAmountScreen, CurrencySellConfirmationScreen, SwapProcessingScreen). Implements transaction tracking in SwapProcessingViewModel (tokenPurchase/tokenSell) and adds new analytics events/properties and enum cases in Utilities/Events.swift.
Replace string-based analytics names with a typed AnalyticsEvent system and domain-specific enums (GeneralEvent, AccountEvent, ButtonEvent, TransferEvent, OnrampEvent, WalletEvent, TokenInfoEvent, TokenTransactionEvent). Change Analytics.track to accept AnalyticsEvent and update all call sites accordingly. Consolidate token info and token transaction tracking methods to use the new enums. Remove fee handling from the currency-swap processing flow (remove fee param/property from SwapProcessingViewModel/SwapProcessingScreen and related path cases), and update related screens/view models (CurrencySellAmountScreen, CurrencySellConfirmationScreen, CurrencySellViewModel). Update analytics calls across onboarding, onramp, wallet, session, give, and balance screens to the new typed API and rename several button/event identifiers. Also clean up Analytics property definitions (remove fee property) and unify property handling for track calls.
raulriera referenced this pull request in code-payments/code-android-app Feb 19, 2026
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
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