Web SDK
The ScaleBun Web SDK — one browser SDK for product analytics, errors, performance, session replay, feature flags, and engagement, with integrations for React, Next, Vue, Svelte, and Angular.
@scalebun/web is the browser counterpart of the ScaleBun mobile SDK. One
install captures what happens in a web app — events, errors, network,
performance, replay — and feeds the same dashboard and the same unified session
model as the React Native SDK. It is framework-agnostic, has zero third-party
runtime dependencies, is SSR-safe, and is no-op-safe before init().
Start here#
What it captures#
| Area | What it does | Default |
|---|---|---|
| Product analytics | Events, identity, groups, super-properties, revenue, and DOM autocapture (clicks, submits, pageviews, rageclicks) | On |
| Errors & crashes | Uncaught errors, captureError, breadcrumbs, crash recovery | On |
| Performance | Web Vitals (LCP/INP/CLS), page-load and SPA route transactions, network monitoring | On |
| Session replay | DOM-reconstruction replay with masking | Off (opt-in) |
| Feature flags | Flags, remote config, rollouts, and experiments with deterministic bucketing | On |
| Engagement | Surveys, NPS/CSAT, in-app campaigns, web push, coachmarks | On |
Every feature toggle#
Those areas are made of seventeen individually switchable features. Twelve are on by default; five are opt-in.
| Toggle | Default | What it is |
|---|---|---|
analytics | On | Product-analytics + revenue lane |
errors | On | Uncaught errors, rejections, captureError |
network | On | fetch / XHR / WebSocket / SSE capture |
console | On | Console output as breadcrumbs |
crash | On | ReportingObserver + session-liveness recovery |
webVitals | On | LCP, INP, CLS, FCP, TTFB with attribution |
webPerf | On | Page load (Navigation Timing), FPS, LoAF |
performance | On | Transactions and spans (RUM) |
journey | On | Screens, navigation, interactions |
config | On | Flags, remote config, rollouts, experiments |
engage | On | Surveys, NPS/CSAT, in-app campaigns |
bugReport | On | reportBug() and the optional launcher widget |
replay | Off | Session replay |
inbox | Off | Persistent message inbox |
inapp2 | Off | In-App Messaging 2.0 engine |
watchdog | Off | Continuous resource health and incidents |
profiler | Off | JS Self-Profiling flame graphs |
Web push and coachmarks have no toggle — they load lazily from the facade the first time you call them, so they cost nothing until you do.
The one-SDK model#
The Web SDK is a plugin host: every capability is a feature that registers with a shared facade and a single egress pipeline. That means one session container holds errors, network calls, performance spans, replay frames, and ratings as items — the same model the mobile SDK uses, so a session reads the same way regardless of platform.