Skip to content

Installation

Remove the standard Segment package and replace it with this wrapper:

Terminal window
bun remove @segment/analytics-next
bun add @adpharm/silo-analytics

@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.

// before
import { AnalyticsBrowser } from "@segment/analytics-next";
// after — same surface, plus the Time on Page plugin auto-registers
import { AnalyticsBrowser } from "@adpharm/silo-analytics";
  • 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.