chore(analytics): add tipping flow tracking (scan funnel + sent tip) - #552
Merged
Merged
Conversation
Ports code-android-app#1141 to iOS, mirroring its event names and property values verbatim. New events: - "Tip Card Scanned" — a tip code is scanned on the camera (ScanViewModel). - "Tip Card Presented" — a scanned/deeplinked tip card resolves and shows (TipFlow.present). - "Sent Tip" — a tip completes, via TransferEvent so it carries the same Fiat/Currency/State/Error as Sent Cash. Fired from SendAmountViewModel.submit by branching on the send target, which covers both the scanned-tipcard flow and Send Cash inside a tip thread (both submit there). "Sent Message" now carries a "Chat Type" property (Tip / Contact / Unknown), derived from the conversation kind at ConversationController.deliver. Gives the funnel: Tip Card Scanned -> Tip Card Presented -> Sent Tip.
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
Ports Android code-android-app#1141 to iOS — analytics for the tipping flows, mirroring the existing send/chat tracking. Event names and property values are shared verbatim with Android.
New events
ScanViewModel.didScan)TipFlow.present)Fiat,Currency,State,Error(same asSent Cash)Existing Sent Message now carries a
Chat Typeproperty (Tip/Contact/Unknown).Funnel: Tip Card Scanned → Tip Card Presented → Sent Tip.
How
TransferEvent.sentTip→"Sent Tip", fired through the existingAnalytics.transfer(...)plumbing so it carries amount/state/error.TipFlow) and the Send Cash action inside a tip thread (ConversationScreen→SendTarget) funnel throughSendAmountViewModel.submit. It now branches on the send target —.tip→Sent Tip,.contact→Sent Cash— so both Android sites (TippingCoordinator.confirmTip+ in-chat tip) are covered in one place.Analytics.TipCardEvent.scanned/.presentedfor the funnel's first two steps.Analytics.sentMessage(chatType:error:)derives the type from the conversation kind (ConversationType?) atConversationController.deliver;nil→Unknown, matching Android.Property values match Android exactly:
contactDm→"Contact",tipDm→"Tip", unresolved →"Unknown".Testing
./Scripts/build.sh→ BUILD SUCCEEDED./Scripts/test.sh FlipcashTests/SendAmountViewModelTests FlipcashTests/ConversationControllerTests→ 67 tests passed.