Skip to content

refactor(checkout-widgets): remove Segment react-analytics - #2914

Open
alex-connolly wants to merge 2 commits into
mainfrom
refactor/checkout-remove-segment-analytics
Open

refactor(checkout-widgets): remove Segment react-analytics#2914
alex-connolly wants to merge 2 commits into
mainfrom
refactor/checkout-remove-segment-analytics

Conversation

@alex-connolly

Copy link
Copy Markdown
Contributor

Summary

  • Remove @imtbl/react-analytics, @segment/analytics-next, and the checkout analytics-provider wiring
  • Strip all Segment track / page / identify call sites from checkout widgets
  • Leave host-facing widget events unchanged (e.g. sale success/failure EventTarget events)

Test plan

  • Checkout widgets still mount (connect, bridge, swap, sale, wallet, on-ramp, purchase, add-tokens)
  • Widget host events still fire as before
  • Confirm no Segment / react-analytics network traffic from widgets
  • CI lint/typecheck for checkout-widgets passes

Made with Cursor

@alex-connolly
alex-connolly requested review from a team as code owners July 25, 2026 18:54
@github-actions

github-actions Bot commented Jul 25, 2026

Copy link
Copy Markdown

✅ Audience Bundle Size — @imtbl/audience

Metric Size Delta vs main (c74228b)
Gzipped 11925 bytes (11.64 KB) 0 bytes
Raw (minified) 33600 bytes 0 bytes

Budget: 24.00 KB gzipped (warn at 20.00 KB)

@nx-cloud

nx-cloud Bot commented Jul 25, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 0004f12

Command Status Duration Result
nx affected -t build,test ✅ Succeeded 2m 4s View ↗
nx run-many -p @imtbl/sdk,@imtbl/checkout-widge... ✅ Succeeded 53s View ↗

☁️ Nx Cloud last updated this comment at 2026-08-20 06:03:51 UTC

Drop product analytics from checkout widgets: remove
@imtbl/react-analytics, Segment, analytics-provider, and all
track/page/identify call sites. Host widget events are unchanged.

Co-authored-by: Cursor <[email protected]>
@alex-connolly
alex-connolly force-pushed the refactor/checkout-remove-segment-analytics branch from 1d8fce4 to 5b68ec6 Compare July 28, 2026 00:49
@alex-connolly

Copy link
Copy Markdown
Contributor Author

@cursoragent resolve conflicts and fix tests

@cursor

cursor Bot commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Perfect! I've successfully resolved the merge conflicts and verified that the tests pass. Here's what I did:

Changes Made

  1. Resolved merge conflicts in two files:

    • packages/checkout/widgets-lib/src/widgets/connect/components/WalletList.tsx - Kept the removeSpace and parseChainId imports from main (needed by the code)
    • packages/checkout/widgets-lib/src/widgets/connect/views/ReadyToConnect.tsx - Removed analytics imports but kept parseChainId import from main (needed by the code)
  2. Verified tests pass - Ran the checkout-widgets test suite directly, which confirmed all 263 tests pass successfully.

  3. Committed and pushed the merge resolution to the branch.

The conflicts arose because the PR removed Segment analytics code while main added new functionality that required the parseChainId utility. I preserved the necessary imports while keeping the analytics removal intact, maintaining the goal of this PR (removing Segment react-analytics) while ensuring the code still functions correctly with the latest changes from main.

Open in Web Open in Cursor 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants