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. |
data-mask-all-text | No | Not set | Hides all page text, not just form fields: the replay shows asterisks and the video boxes every piece of text. It has no opt-out. See Privacy and masking. Set it to “false” to turn it off again. |
data-label | No | Report a problem | The words on the button (up to 40 characters). |
data-color | No | Black (white in a dark theme) | The button and panel accent, as a hex colour such as #0c66e4. The text on it is chosen to stay readable. Anything that is not a hex colour is ignored. |
data-position | No | right | Which bottom corner the button sits in: left or right. |
async | No | Not set | Recommended: the script loads without blocking your page. |
The panel follows the visitor’s light or dark setting. Beyond the label, colour and corner above, its styling is not configurable.
With the React component from the Install page, add script.dataset.maskAllText = ""; next to the other script.dataset lines to turn on data-mask-all-text.
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 and the video capture. Details and examples are in Privacy and masking.
| Attribute | Effect |
|---|---|
data-showbug-mask | Replay: text is masked and the layout stays. Video: the element is covered. Clicks inside it are not logged. |
data-showbug-block | Replay: replaced by an empty box. Video: covered. Clicks inside it are not logged. |
data-showbug-unmask | On a form field or editor: recorded as typed and left uncovered. Card numbers are still hidden; password, card, one-time-code and hidden fields stay hidden. |
data-private | The original name for data-showbug-block. It keeps working. |
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. Per visitor address and project, per clock hour. |
| Status | Active | Pause to stop new reports; resume any time. |
| Keys | One key | Up to 10 active keys per project. |