Script tag (recommended)
Add the SDK script to your HTML. It loads asynchronously and won’t block page rendering.Configuration options
Theinit method accepts a configuration object:
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
sdkKey | string | Yes | — | Your SDK key from the dashboard |
tenant | string | Yes | — | Your tenant slug (subdomain) |
position | 'bottom-right' | 'bottom-left' | No | 'bottom-right' | Widget bubble position |
offset | { x: number, y: number } | No | { x: 20, y: 20 } | Pixel offset from the corner |
hidden | boolean | No | false | Start with the widget bubble hidden |
environment | 'prod' | 'staging' | No | 'prod' | Environment tag for events |
What happens on init
- The SDK fetches your widget configuration from the API
- A chat bubble is rendered in the corner of the page
- An iframe is created (hidden) to host the widget UI
- Automatic page view tracking starts
- Session replay starts in buffer mode (if enabled in your settings)
If the SDK key is invalid or the API is unreachable, the widget will not mount and a warning is logged to the console.
Single Page Applications
The SDK automatically tracks page navigations in SPAs by interceptingpushState and replaceState. No additional configuration is needed for React, Vue, Angular, or other SPA frameworks.
