Installation
Remove the standard Segment package and replace it with this wrapper:
bun remove @segment/analytics-nextbun add @adpharm/silo-analyticsPeer dependency
Section titled “Peer dependency”@segment/analytics-next is a peer dependency of @adpharm/silo-analytics.
Removing your direct install is fine — your package manager keeps it present
transitively. You import everything from @adpharm/silo-analytics instead: it
re-exports the full analytics-next surface unchanged, so any existing
import { ... } from "@segment/analytics-next" becomes
import { ... } from "@adpharm/silo-analytics" with no other changes.
// beforeimport { AnalyticsBrowser } from "@segment/analytics-next";
// after — same surface, plus the Time on Page plugin auto-registersimport { AnalyticsBrowser } from "@adpharm/silo-analytics";Requirements
Section titled “Requirements”- A browser runtime. The library is browser-only ESM — there is no backend or SSR shell. In SSR frameworks, initialize it on the client only.
- A Segment-compatible tracking endpoint (defaults to the Silo event gateway — see Configuration to override).
Next: Quick Start.