Skip to content

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

AttributeRequiredDefaultWhat it does
data-keyYesNoneThe project’s public key (pk_…). Without it the loader logs “missing data-key” and shows nothing.
data-apiNoThe script’s own originWhere reports are sent. Keep the value from your project page.
asyncNoNot setRecommended: 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:

PropRequiredDefaultWhat it does
projectKeyYesNoneThe project’s public key.
apiUrlYesNoneThe API origin from the install snippet (data-api).
scriptUrlNohttps://showbugai.com/sdk/loader.jsThe loader script. Set it for any other environment.
userNoNone{ 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

CallWhat 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.

AttributeEffect
data-privateThe 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.

SettingDefaultNotes
NameSet when createdUp to 120 characters.
Allowed originsSet when createdUp to 50 origins. See API keys and security.
Longest report180 seconds30 to 600 seconds.
Reports per hour300 to 300. 0 stops new reports.
Reports per month1,0000 to 10,000, over a rolling 30 days.
Reports per visitor IP per hour100 to 60. Saved, but not enforced yet.
StatusActivePause to stop new reports; resume any time.
KeysOne keyUp to 10 active keys per project.