Skip to content

feat(analytics): stop client double-counting of server-side events (master)#2114

Merged
MusabShakeel576 merged 1 commit into
masterfrom
claude/clever-gates-lWgca-master
Jun 3, 2026
Merged

feat(analytics): stop client double-counting of server-side events (master)#2114
MusabShakeel576 merged 1 commit into
masterfrom
claude/clever-gates-lWgca-master

Conversation

@MusabShakeel576
Copy link
Copy Markdown
Contributor

Promotes the client analytics changes from qa (#2113) to master via cherry-pick.

What this does

These five events are now emitted server-side via the backend Amplitude Node SDK (solid-backend #1504). To avoid double-counting in Amplitude, the matching client completion events opt out of Amplitude — Firebase + GTM still fire, so web conversion / ad attribution is preserved. This is done via a new per-call amplitude option on track().

Event Client site opted out of Amplitude
Account Created SIGNUP_COMPLETED (app/signup/creating.tsx)
Savings Deposit DEPOSIT_COMPLETED in the 5 backend-routed deposit hooks (EOA USDC/Fuse/ETH, Solid USDC/ETH)
Card Deposit CARD_DEPOSIT_COMPLETED (useCardDepositPoller)
Card Borrow BRIDGE_TO_ARBITRUM_COMPLETED in useBorrowAndDepositToCard only

Intentionally left firing Amplitude (no backend equivalent, would otherwise lose data):

  • useDeposit and useDepositFromSolidFuse — client-only deposits (no backend createDeposit call).
  • useTransferToWallet — the add-funds-to-wallet step (step 1), which the backend does not track.
  • useBridgeToCard / useSwapAndBridgeToCard — generic bridge/swap-to-card (not borrows; create BRIDGE_DEPOSIT, which the borrow cron does not track).

trackIdentity calls are kept (they set the Amplitude user id / properties).

Notes

  • This is the UI half of a matched pair with backend Fix Underline component for native platforms and ExchangeDisclaimer button width #1504 — they should land on master together (promoting only one would cause double-counting or data loss in production).
  • The useBorrowAndDepositToCard.ts cherry-pick conflict was resolved by keeping master's newer payload (transaction_result + fee field) and layering the Amplitude opt-out on top.
  • Validated: tsc clean for all changed files; ESLint + Prettier clean.

https://claude.ai/code/session_011g7dN8ScZ3Yr4U6fhYEsq5


Generated by Claude Code

…r-side

Promotes the client-side analytics changes from qa (PR #2113) to master via
cherry-pick. These five events are now emitted server-side via the backend
Amplitude Node SDK, so the matching client completion events opt out of
Amplitude (Firebase + GTM still fire, preserving web conversion attribution):

- Account Created: SIGNUP_COMPLETED (signup/creating).
- Savings Deposit: DEPOSIT_COMPLETED in the 5 backend-routed deposit hooks
  (EOA USDC/Fuse/ETH, Solid USDC/ETH). Client-only deposits (useDeposit,
  useDepositFromSolidFuse) and the add-funds-to-wallet step (useTransferToWallet)
  keep firing Amplitude — the backend does not track those paths.
- Card Deposit: CARD_DEPOSIT_COMPLETED (useCardDepositPoller fallback).
- Card Borrow: BRIDGE_TO_ARBITRUM_COMPLETED in useBorrowAndDepositToCard only.

Done via a per-call `amplitude` option added to track(). trackIdentity calls
are kept. Conflict in useBorrowAndDepositToCard.ts was resolved by keeping
master's newer payload (transaction_result + fee field) and layering the
Amplitude opt-out on top.

https://claude.ai/code/session_011g7dN8ScZ3Yr4U6fhYEsq5
@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 2, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
solid-app Ignored Ignored Jun 2, 2026 5:46pm
solid-app-staging Ignored Ignored Jun 2, 2026 5:46pm

Request Review

@MusabShakeel576 MusabShakeel576 merged commit 54a7b22 into master Jun 3, 2026
4 of 5 checks passed
@MusabShakeel576 MusabShakeel576 deleted the claude/clever-gates-lWgca-master branch June 3, 2026 06:50
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.

2 participants