Skip to content

chore(analytics): add tipping flow tracking (scan funnel + sent tip) - #552

Merged
bmc08gt merged 1 commit into
mainfrom
chore/tipping-analytics
Aug 6, 2026
Merged

bmc08gt merged 1 commit into
mainfrom
chore/tipping-analytics

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

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

Event Fires when Properties
Tip Card Scanned A tip code is scanned on the camera (ScanViewModel.didScan)
Tip Card Presented A scanned/deeplinked tip card resolves and is presented (TipFlow.present)
Sent Tip A tip completes — from the scanned-card flow or an in-chat tip DM Fiat, Currency, State, Error (same as Sent Cash)

Existing Sent Message now carries a Chat Type property (Tip / Contact / Unknown).

Funnel: Tip Card Scanned → Tip Card Presented → Sent Tip.

How

  • TransferEvent.sentTip"Sent Tip", fired through the existing Analytics.transfer(...) plumbing so it carries amount/state/error.
  • Single fire site for both tip paths: on iOS both the scanned-tipcard flow (TipFlow) and the Send Cash action inside a tip thread (ConversationScreenSendTarget) funnel through SendAmountViewModel.submit. It now branches on the send target — .tipSent Tip, .contactSent Cash — so both Android sites (TippingCoordinator.confirmTip + in-chat tip) are covered in one place.
  • Analytics.TipCardEvent.scanned / .presented for the funnel's first two steps.
  • Analytics.sentMessage(chatType:error:) derives the type from the conversation kind (ConversationType?) at ConversationController.deliver; nilUnknown, matching Android.

Property values match Android exactly: contactDm"Contact", tipDm"Tip", unresolved → "Unknown".

Testing

  • ./Scripts/build.shBUILD SUCCEEDED
  • ./Scripts/test.sh FlipcashTests/SendAmountViewModelTests FlipcashTests/ConversationControllerTests67 tests passed.
  • No behavior change beyond analytics emission.

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.
@bmc08gt
bmc08gt merged commit a3ead88 into main Aug 6, 2026
@bmc08gt
bmc08gt deleted the chore/tipping-analytics branch August 6, 2026 15:36
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