Browser SDK
Observe client errors, requests, performance, and user sessions in a JavaScript app.
Install
npm install @everock/sdk@beta
Use the generic browser entry when you do not need the Next.js or Vite adapter. It runs in JavaScript browser applications; it is not a native Swift or Kotlin SDK.
import { init, captureError, identify } from '@everock/sdk';
init({
publicKey: 'pk_YOUR_PROJECT_KEY',
endpoint: 'https://collector.example.com',
environment: 'production',
release: 'build-2026-11-10',
component: 'web',
serviceName: 'Web app',
});
identify({ id: 'user_123' });
captureError(new Error('An example handled failure'), { handled: true });
Automatic capture
The browser entry captures unhandled errors and rejections. Request capture measures supported fetch and XMLHttpRequest traffic; performance capture reports supported web vitals and runtime performance signals. Request URLs are redacted before transmission.
Additional console logs, page events, rage clicks, and replay depend on the project's Browser SDK settings. Replay also requires local opt-in and visitor consent. A setting does not invent historical data.
Custom events
import { capture, flush, identify } from '@everock/sdk';
capture('log', 'Checkout opened', { step: 'payment' });
identify(null); // Clear identity at logout.
await flush();
Use a stable application identifier, not a password or access token. Browser sessions and durable storage are bounded and subject to the browser's storage availability.
See privacy, replay, and delivery diagnostics.