feat: increase analytics coverage, also refactor the naming to group events#106
Open
raulriera wants to merge 4 commits intorefactor-new-serverfrom
Open
feat: increase analytics coverage, also refactor the naming to group events#106raulriera wants to merge 4 commits intorefactor-new-serverfrom
raulriera wants to merge 4 commits intorefactor-new-serverfrom
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.