Skip to content

feat(analytics): catalogue iOS-only events and correct drift notes - #1891

Merged
bmc08gt merged 4 commits into
code/cashfrom
feat/analytics-ios-reconcile
Oct 30, 2026
Merged

bmc08gt merged 4 commits into
code/cashfrom
feat/analytics-ios-reconcile

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

iOS sends eleven event names that the shared catalogue (libs/analytics-events/events.toml) doesn't have, and five catalogue notes no longer match either app. This PR closes both gaps in the catalogue and wires the Android events that have a flow (below). Draft until the remaining Button events are wired.

iOS names to catalogue outcome

iOS name Outcome
Auto-login complete New entry, Account domain, no properties.
Create Account New entry, Account domain, without Owner Public Key. That property is a wallet identifier and isn't approved for the shared contract. iOS sends it today; it stops when iOS moves to the builder (drift note added).
Button: Buy With Currency New Button list value BUY_WITH_CURRENCY. Name unchanged.
Button: Give New Button list value GIVE. Name unchanged.
Gallery Scan: Code Found Mapped to Gallery Scan: Succeeded. No iOS name added. Series break on the iOS release that migrates.
Gallery Scan: Nothing Found Mapped to Gallery Scan: Failed. No iOS name added. Series break on the iOS release that migrates.
Token Info: Opened From Give New TokenInfoSource value GIVE. The placeholder expands to the same name, so history continues.
Token Info: Opened From Send New TokenInfoSource value SEND. Same name, history continues.
Token Purchase With Currency New PurchaseMethod value CURRENCY. Same name, history continues.
Currency Launch With Reserves New event Currency Launch With {method}, new list LaunchMethod. Properties match iOS: State, Mint, Payment Mint, Fiat, Currency, Error.
Currency Launch With Currency Same event, CURRENCY value.

The series break for the two Gallery Scan names comes with a loss of detail. iOS's Type (Kik or QR) and its three-way State have no counterpart on Android's Succeeded and Failed. The existing drift notes on those events now say iOS will migrate and the old series ends.

Token Info Give and Send have no Android flow. Android's Give screen opens Add Money (Give Shortfall) instead, so both values carry a drift note. Button: Give is the iOS Currency Info button that opens its send-to-person amount screen, which maps to Android's Send tile.

A new Swift typealias is added for LaunchMethod and CurrencyLaunchEvents.

Note fixes

Each was checked against iOS origin/main and this branch's Android code.

  • Deeplink: Parse: iOS's Type list now has Profile (was Username), ChatMessage and GroupInvite. iOS reports a parse only for links that resolve to an action (DeepLinkController.swift:70), so the failure form (parseFailed) gets a drift note that iOS never sends it.
  • Deeplink: Routed: "every kind" was wrong. Access-key and verify-email links never report a route, and the rest report only when a user is logged in.
  • GroupInviteSheetSource: the iOS head card was removed in cb036f487, and iOS sends Profile from ChatProfileScreen and JoinRequestsScreen. Android's transcript CTA was also dropped (feat(chat): drop the card at the start of chat history #1707) and only sends Profile, so Chat is now sent by neither app. The value stays (removing it changes the generated enum) with a drift note.
  • GroupInviteSource Chat Card: this differs from the request. iOS still sends Chat Card when a group card in a chat is tapped (ConversationScreen.swift:1903, openLinkCard), the same as Android (MessengerScreen ChatAction.OpenGroup). iOS sends Link only for a card whose link carries no chat id, which goes through the deep-link path. The drift note says that instead of "reports Link".
  • Group: Joined: now says neither app sends it for a join from an invite link. iOS's invite join (SessionAuthenticator.swift:962) and Android's (InviteLandingViewModel via GroupInviteLanding.join) never call it.

Where to send it

Android has each of these flows. Nothing sends them yet. iOS gets them only after the next Publish SharedCore release.

Event Android location
Auto-login complete AuthManager, the LookupResult.ExistingAccountFound branch, after softLogin(...) succeeds.
Create Account LoginViewModel, the Event.CreateAccount handler, next to the existing Button: Create Account, before authManager.createAccount().
Button: Buy With Currency SwapViewModel, Event.OnBuyConfirmed, in the branch where the funding token isn't USDF.
Button: Give CurrencyInfoContentV2, the CurrencyActionTile.Send tap.
Token Purchase With Currency SwapViewModel.trackTransaction. It maps any funding source other than Phantom or Coinbase to Reserves today, so a held-currency buy needs its own branch.
Currency Launch With … CurrencyCreatorViewModel: the launchToken result and completeLaunch/finalizeLaunch. Reserves when the funding mint is USDF, otherwise Currency.
Token Info: Opened From Give / Send No Android flow.

Not included

  • Wiring Button: Buy With Currency and Button: Give; both keep their drift notes.
  • Removing the unused Chat value from GroupInviteSheetSource.
  • Button: Allow Camera and Button: Sell, which iOS also sends as native names. They weren't in the audit's list of eleven.

As wired on Android

Event Android function Moment
Create Account LoginViewModel, Event.CreateAccount pipeline Right after Button: Create Account, before authManager.createAccount().
Auto-login complete AuthManager.init, LookupResult.ExistingAccountFound branch After softLogin(...) succeeds, before onInitialized().
Currency Launch With Reserves / Currency CurrencyCreatorViewModel.completeLaunch via trackLaunch When the launch settles, as iOS does after its balance poll: Success once the launched token resolves (finalizeLaunch), Failure on a non-timeout poll error, a failed resolve, or a failed slow poll. Reserves when the funding mint is USDF, otherwise Currency. Fiat and Currency are the launch cost converted to the preferred currency. A failure to submit the launch (launchToken error) sends nothing, as on iOS.
Token Purchase With Currency SwapViewModel.trackTransaction Same call as the Reserves purchase, now chosen when the funding mint is neither null nor USDF.
Button: Buy With Currency, Button: Give no event sent, drift note kept Not wired here.
Token Info: Opened From Give / Send no flow, drift note Android's Give opens Add Money.

AuthManager now takes FlipcashAnalytics, and CurrencyCreatorViewModel does too. The Token Purchase With {method} drift note no longer says Android reports a held-currency buy as Reserves.

@bmc08gt bmc08gt self-assigned this Oct 30, 2026
@github-actions github-actions Bot added type: feature New functionality area: auth Login, session, access keys, identity area: tokens Token accounts, balances, token info area: onboarding labels Oct 30, 2026
Create Account (LoginViewModel), Auto-login complete (AuthManager), Currency Launch With
Reserves/Currency (CurrencyCreatorViewModel) and Token Purchase With Currency (SwapViewModel).
Drops the stale catalogue note that Android reports a held-currency buy as Reserves.
@bmc08gt
bmc08gt force-pushed the feat/analytics-ios-reconcile branch from 5e8b2b9 to 0fc8ed0 Compare October 30, 2026 03:23
@bmc08gt
bmc08gt marked this pull request as ready for review October 30, 2026 04:03
@bmc08gt
bmc08gt merged commit 1df6eb6 into code/cash Oct 30, 2026
6 checks passed
@bmc08gt
bmc08gt deleted the feat/analytics-ios-reconcile branch October 30, 2026 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: auth Login, session, access keys, identity area: onboarding area: tokens Token accounts, balances, token info type: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant