Skip to content

Add-ons

The forms, capture studio, and recording annotation implementations are separate from the core SDK bundle.

Add-on Loads when Default behavior Disable
forms The widget mounts Loads from /sdk/bugfence-forms.min.js on the endpoint origin forms: false
studio The widget mounts Loads from /sdk/bugfence-studio.min.js on the endpoint origin studio: false
annotate A screen recording starts Loads from /sdk/bugfence-annotate.min.js on the endpoint origin annotate: false

Most users should leave these options unset. The SDK requests add-ons when needed. To self-host an asset, set its option to a full URL:

BugFence.init({
projectKey: 'pk_live_your_public_key',
endpoint: 'https://bugs.example.com/api/v1/reports',
studio: 'https://cdn.example.com/sdk/bugfence-studio.min.js'
});

Setting an option to false disables the feature, even if an implementation was registered. A pre-registered static add-on is used when the option is omitted. Static bundling requires access to the relevant npm packages; check registry access before choosing it.

For static bundling with the standalone SDK, register the supplied implementations with BugFence.registerForms, BugFence.registerStudio, or BugFence.registerAnnotator before calling BugFence.init. With the React provider, pass the implementations as the forms, studio, or annotate properties of its addons prop; the provider registers them before initialization. Supply only implementations available from your installed packages. When used, a locally registered implementation avoids a separate request for that add-on.

For example, after installing an accessible version of the core bugfence package alongside the React package:

import { BugFenceProvider } from '@social-pulse-crm/bugfence-react';
import { formsAddon } from 'bugfence/forms';
import { studioAddon } from 'bugfence/studio';
import { RecordingAnnotator } from 'bugfence/annotate';
<BugFenceProvider
config={{ projectKey: 'pk_live_your_public_key', endpoint: 'https://bugs.example.com/api/v1/reports' }}
addons={{ forms: formsAddon, studio: studioAddon, annotate: RecordingAnnotator }}
>
<App />
</BugFenceProvider>

If forms or studio cannot load, the widget keeps working with its default reporter behavior. If annotations cannot load, recording can continue without the annotation overlay.

Replay canvas snapshots and owned-frame recording have separate exports but are gated off in this release. They are not supported widget add-ons yet.