Web SDK

Configuration options

Every option you can pass to Flamio.init in web SDK 0.9.0, with types, defaults and examples.

Pass options to Flamio.init once, when your site starts. The SDK reads them at init: a second init call is ignored. To change options on a running page, call Flamio.stop() and then Flamio.init() with the new options.

Example with common options
import { Flamio, type FlamioConfig } from '@flamioai/web-sdk';

const config: FlamioConfig = {
  projectKey: 'YOUR_KEY_HERE',
  endpoint: 'https://api.flamio.org/api',
  version: '1.4.2',
  sampleRate: 0.5,
  consent: 'wait',
  maskSelectors: ['.account-balance'],
  blockSelectors: ['.id-photo'],
  urlBlocklist: ['example.com/admin'],
};

Flamio.init(config);

YOUR_KEY_HERE is your project's API key from Flamio On-Live > Setup.

Required

Prop

Type

General

Prop

Type

Sampling and limits

Prop

Type

A visit covers every tab of your site in the same browser. It ends after 30 minutes without activity.

Privacy

Prop

Type

What visitors type into inputs, text areas and selects is always masked. No option turns this off.

maskTextContent does not mask recordings in 0.9.0

Setting maskTextContent: true leaves page text visible in recordings. To hide text, use the flamio-mask class or maskSelectors. See Control what is recorded.

URL filtering

Prop

Type

How patterns match:

  • A pattern matches anywhere in the full page URL, such as https://example.com/account/orders?page=2. Case does not matter.
  • * matches any run of characters and is the only wildcard. Every other character, including ? and ., matches itself.
  • The SDK checks the rules on page load and on every route change of a single-page app.
  • While the visitor is on a page that does not pass, nothing is recorded: no page content, console errors or failed requests.

Because a pattern matches anywhere, /admin also matches https://example.com/blog/admin-tips. Include the host to match a path from its start:

Record the app, but not the billing pages
import { Flamio } from '@flamioai/web-sdk';

Flamio.init({
  projectKey: 'YOUR_KEY_HERE',
  endpoint: 'https://api.flamio.org/api',
  urlAllowlist: ['example.com/app/*'],
  urlBlocklist: ['example.com/app/settings/billing'],
});

Replace example.com with your site's host.

Advanced

These options tune how the SDK packages and sends recordings.

Prop

Type

Leave these options at their defaults unless Flamio support asks you to change them.

Options not to use

The 0.9.0 types also include guide, an option of an in-page guide that is not available to customers. Leave it unset: with it, your page can show a guide button that cannot complete a request.