chore(analytics): add tipping flow tracking (scan funnel + sent tip) - #1141
Merged
Conversation
Instrument the tipping flows, mirroring the existing send/chat analytics. Scanned tip-card funnel: - "Tip Card Scanned" — CodeScanDelegate.onTipCardScanned (on scan) - "Tip Card Presented" — TipCardDelegate resolve success (scan + deeplink) - "Sent Tip" — TippingCoordinator.confirmTip success/failure (analytics injected; previously commented-out tracking activated) Chat side: - In-chat payments fire "Sent Tip" for tip DMs, "Sent Cash" otherwise - "Sent Message" now carries a "Chat Type" property (Tip/Contact/Unknown) via messageSentInChat(type) Adds Analytics.Transfer.SentTip and AnalyticsEvent.TipCardEvent (Scanned/Presented), wired through the Mixpanel delegate and stub.
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.
What
Adds analytics to the tipping flows, mirroring the existing send/chat analytics (
Sent Cash/Sent Message). Covers both the scanned tip-card flow and the chat side.New events
CodeScanDelegate.onTipCardScanned)TipCardDelegate)Fiat,Currency,State, … (same asSent Cash)Existing Sent Message now carries a
Chat Typeproperty (Tip/Contact/Unknown).This gives a funnel: Tip Card Scanned → Tip Card Presented → Sent Tip.
How
Analytics.Transfer.SentTip→ standalone"Sent Tip"event (fired via the existingtransfer()plumbing, so it carries amount/state/error). Intentionally not aChatEvent, since the scanned-card path is not a chat.AnalyticsEvent.TipCardEvent.Scanned/.Presented, plustipCardScanned()/tipCardPresented()on the service interface (wired throughMixpanelAnalyticsDelegateand the stub).messageSentInChat(type: ChatType, …)—ChatViewModelderives the type from the resolved participant (TipUser→TIP_DM,Contact→CONTACT_DM).SentTipvsSentCashon participant type.TippingCoordinator.confirmTip()— injectedFlipcashAnalyticsServiceand activated the previously commented-out tracking asSentTip.Testing
:analytics,:session,:tipping,:messengerall compile (compileDebugKotlin).