@scalebun/web
v1.5.1
Published
The ScaleBun web SDK — unified-session observability for the browser (errors, network, performance, replay, sessions). Framework-agnostic core.
Readme
@scalebun/web
The ScaleBun web SDK — unified-session observability for the browser: errors, network,
performance, replay, and analytics, all captured under one session model. Framework-agnostic core;
framework adapters (@scalebun/web-react, -vue, -angular, -next, -svelte) layer on top.
Install
npm install @scalebun/web
# or: pnpm add @scalebun/web / yarn add @scalebun/webQuick start
import { ScaleBun } from '@scalebun/web';
await ScaleBun.init({
clientKey: 'your-client-key',
});
// Track product events
ScaleBun.track('checkout_completed', { plan: 'pro', amount: 49 });
// Attach a user identity
ScaleBun.identify('user_123', { email: '[email protected]' });
// Let a user file a bug report
await ScaleBun.reportBug({ message: 'The export button does nothing' });Errors, network requests, performance metrics, and replay frames are captured automatically once
init() resolves (subject to your config).
Script-tag / CDN usage
A prebuilt browser bundle is published for unpkg/jsDelivr. Configure via data- attributes:
<script
src="https://unpkg.com/@scalebun/web/dist/scalebun.min.js"
data-client-key="your-client-key"
></script>Entry points
| Import | Purpose |
|---|---|
| @scalebun/web | Main SDK (ESM) — the ScaleBun facade + typed tracking helpers. |
| @scalebun/web/inapp | In-app messaging / widget surface. |
| @scalebun/web/browser | Prebuilt minified browser bundle (IIFE, for <script> tags). |
