Widget Setup

Configuration

All widget configuration is set via the window.faqsir object, which must be defined before the widget script loads.

Complete Configuration

window.faqsir = {
  api_key: 'YOUR_API_KEY',       // Required
  site_id: 'YOUR_SITE_UUID',       // Required
  options: {
    api_url: 'https://faqsir.com/api',      // Required - the FAQsIR API endpoint
    // Panel launcher button text (default: "Summarise")
    panel_launcher_label: 'Summarise',

    // FAQ accordion behavior
    exclusive: true,   // Only one FAQ open at a time (default: false)

    // Sticky CTA (floating callout)
    sticky_cta: {
      enabled: true, // (default: false)
      position: 'bottom-center', // default (bottom-right)
    },
  }
};

Required Options

Option Type Description
api_key string Your FAQsIR API key for authentication.
site_id string Your FAQsIR Site UUID for authorisation.
options.api_url string Base URL of the FAQsIR API (e.g. https://faqsir.com/api).

General Options

Option Type Default Description
options.panel_launcher_label string "Summarise" Text displayed on the panel launcher button.
options.exclusive boolean false When true, only one FAQ accordion item can be open at a time. Opening one closes the others.

Legacy support

options.analyse_button_label is also accepted as an alias for panel_launcher_label. The newer key takes precedence.

Sticky CTA

Controls the floating launcher callout that opens the panel modal. When sticky_cta.enabled is false (default), the launcher button renders inline where the <faqsir-panel> element is placed.

Google Tag Manager

If you are installing via Google Tag Manager, sticky CTA mode should be enabled. GTM injects the widget markup at a position you cannot control, so the floating launcher ensures a consistent experience. See the Google Tag Manager guide for details.

Option Type Default Description
sticky_cta.enabled boolean false Enable the fixed-position floating launcher.
sticky_cta.position string "bottom-right" Screen position for the launcher. See values below.

Position Values

Value Description
bottom-right Bottom-right corner (default)
bottom-left Bottom-left corner
top-right Top-right corner
top-left Top-left corner
bottom-center Bottom edge, horizontally centered
top-center Top edge, horizontally centered
left-center Left edge, vertically centered
right-center Right edge, vertically centered

Example Configurations

Minimal Setup

window.faqsir = {
  api_key: 'YOUR_API_KEY',
    site_id: 'YOUR_SITE_UUID',
  options: {
    api_url: 'https://faqsir.com/api'
  }
};

Floating Callout

window.faqsir = {
  api_key: 'YOUR_API_KEY',
  options: {
    api_url: 'https://api.faqsir.com/api',
    panel_launcher_label: 'Insights',
    sticky_cta: {
      enabled: true,
      position: 'bottom-right',
    }
  }
};
Previous
Plans & Pricing