Configure
Configuration
Every script attribute, React prop and project setting, with its default.
Most settings live in the dashboard, so you can change them without a deploy. The snippet itself takes only a key and the API address.
Script tag attributes
| Attribute | Required | Default | What it does |
|---|---|---|---|
data-key | Yes | None | The project’s public key (pk_…). Without it the loader logs “missing data-key” and shows nothing. |
data-api | No | The script’s own origin | Where reports are sent. Keep the value from your project page. |
async | No | Not set | Recommended: the script loads without blocking your page. |
The button’s position, colour and text are fixed for now. Custom styling is not configurable yet.
React props
For the copy-paste component on the Install page, the key and API address are already in the file; its only prop is user. The upcoming @showbug/react package takes these:
| Prop | Required | Default | What it does |
|---|---|---|---|
projectKey | Yes | None | The project’s public key. |
apiUrl | Yes | None | The API origin from the install snippet (data-api). |
scriptUrl | No | https://showbugai.com/sdk/loader.js | The loader script. Set it for any other environment. |
user | No | None | { userId, accountId, plan }, all optional strings. Updates are sent to identify(). |
Render it once. Unmounting it does not remove the button, and a different key needs a page reload.
JavaScript API
| Call | What it does |
|---|---|
window.Showbug.identify(user) | Attaches { userId, accountId, plan } to the next reports. Pass {} to clear it. |
window.Showbug exists once the loader has run. Use optional chaining (window.Showbug?.identify(…)) if your code can run first.
Attributes on your page
Put these on your own elements to control what the page replay captures. Details and examples are in Privacy and masking.
| Attribute | Effect |
|---|---|
data-private | The element and its children are left out of the page replay, and clicks on it are not logged. |
More masking attributes are on the way
data-showbug-mask, data-showbug-block and data-showbug-unmask are described on the privacy page.
Project settings
Set in the dashboard on the project’s page. Admins and owners can change them; changes reach the widget within about 30 seconds.
| Setting | Default | Notes |
|---|---|---|
| Name | Set when created | Up to 120 characters. |
| Allowed origins | Set when created | Up to 50 origins. See API keys and security. |
| Longest report | 180 seconds | 30 to 600 seconds. |
| Reports per hour | 30 | 0 to 300. 0 stops new reports. |
| Reports per month | 1,000 | 0 to 10,000, over a rolling 30 days. |
| Reports per visitor IP per hour | 10 | 0 to 60. Saved, but not enforced yet. |
| Status | Active | Pause to stop new reports; resume any time. |
| Keys | One key | Up to 10 active keys per project. |