Repository navigation
feat(analytics): catalogue boosts, payment requests and Sent Cash context - #1890
Merged
Merged
Conversation
Sent Cash now carries Context at every call site (Direct, Group Send with Recipient Count, Payment Request), and paying a request share sends it for the first time on Android. Sent Boost, Payment Request: Created and Payment Request: Closed are sent on the result of the call they describe.
… is absent Optional builder params now default to null, so the call sites and tests no longer pass null for Recipient Count. Also disambiguate the ResourceHelper.getString mocks in RequestMoneyAnalyticsTest.
bmc08gt
force-pushed
the
feat/analytics-money-flow
branch
from
October 30, 2026 04:49
f85bc3d to
01f0105
Compare
bmc08gt
marked this pull request as ready for review
October 30, 2026 05:13
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.
Three money movements send nothing useful to Mixpanel today, on either app (section 2 of the 2026-10-29 analytics audit):
Sent Cashwith nothing marking it as a request payment. Android sends nothing when a share is paid.Sent Cashwith the total only, so a send to 5 members looks like a send to 1.This PR adds the catalogue entries and wires Android to send them ("As wired"). It stays draft until iOS is wired.
Entries
Sent Cash(existing)Context(Direct,Group Send,Payment Request, new listSendContext) and optionalRecipient Count(count, Group Send only)Sent Boost(Transfer)Chat Type(existingChatTypelist),State, amount (whole boost, before the split),ErrorPayment Request: Created(new domain)Payer Count(people asked, creator excluded),State, amount (per person),ErrorPayment Request: ClosedState,ErrorSent Cashhad no equivalent ofContextorRecipient Count.Sent Boostsits in Transfer next toSent TipandSent Cashand uses theoutcomegroup like them. Amount is the sameamountgroup.Sent CashwithContext = Payment Request, not a new event.Adding properties to
Sent Cashchanges the generatedTransferEvents.sentCashsignature (the builders have no defaults); every Android call site now passesContextandRecipient Count. iOS gets the new signature only after the next Publish SharedCore release.As wired
All under
apps/flipcash/features/messenger/src/main/kotlin/com/flipcash/app/messenger/internal/, sent throughFlipcashAnalytics.track.Sent Cash,Context = Directcurrencysend/CurrencySendViewModel.kt(send result);ChatViewModel.ktsent(non-cash-link branch);payment/StartChattingPayer.ktsent(TipAction.SEND)holdPaymentSuccess'sreleasewhere it was already thereSent Cash,Context = Group Send,Recipient Count = groupSend.selected.sizeChatViewModel.sendToMembersreleaseafter the success hold, failure immediatelySent Cash,Context = Payment Requestrequest/RequestPayFlow.kt:confirm(success) andafterFailedPayment(failure). CoversRequestPayViewModelandRequestDetailsViewModelrelease, after the success hold. Failure before the refetch, so a failed pay is counted even when the refetch finds the share paid or the request closed. Nothing on the balance and send-limit blocks beforepayments.pay. Amount is the shareSent Boostscreens/boost/ReactionBoostViewModel.boostpayer.boost, success before the 600 ms hold. A failure that isStartChattingPayer.PaymentBlocked(below minimum, balance, send limit, no account, self boost) sends nothing. Amount iscentsToUsd(selectedCents), the whole boostPayment Request: Createdrequest/RequestMoneyViewModel.sendandfailedrequests.createreturns, beforesendPaymentRequest, so a message that fails to send still counts. Failure infailed(), which also covers the seal and draft errors that precedecreate. A retry that reusescreatedRequestIdsends nothing.Payer Count = draft.requestedCount, amountdraft.perPersonPayment Request: Closedrequest/RequestDetailsViewModel.closerequests.closeresult, wrapped insideclose()somarkPaidis unaffected. Not onaskCloseDifferences from the plan above:
Chat TypeonSent Boostismetadata?.type?.analytics, falling back to Unknown, becausemetadatais nullable andChatType.analyticsis not.RequestPayFlow,RequestMoneyViewModel,RequestDetailsViewModel,RequestPayViewModelandReactionBoostViewModeleach take an injectedFlipcashAnalytics. Theevents.tomlentries needed no change.Judgment calls
CreatedandClosedcarryStateandError, likeGroup: Created, so failed creates and closes are countable. Say if you want success-only.Sent Cash.Contextis optional, so the existing sends keep working until they are wired. Once all sites send it, it could become required.Sent BoostfollowsSent Tipin Transfer and has noContext. A boost is its own event because the user's action differs from sending cash.