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.
data-mask-all-textNoNot setHides 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-labelNoReport a problemThe words on the button (up to 40 characters).
data-colorNoBlack (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-positionNorightWhich bottom corner the button sits in: left or right.
asyncNoNot setRecommended: 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:

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 and the video capture. Details and examples are in Privacy and masking.

AttributeEffect
data-showbug-maskReplay: text is masked and the layout stays. Video: the element is covered. Clicks inside it are not logged.
data-showbug-blockReplay: replaced by an empty box. Video: covered. Clicks inside it are not logged.
data-showbug-unmaskOn 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-privateThe 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.

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. Per visitor address and project, per clock hour.
StatusActivePause to stop new reports; resume any time.
KeysOne keyUp to 10 active keys per project.