Skip to content

Configuration

Settings live on window.InviaroSettings and are read once when the bundle boots. Most fields can also be set via data-* attributes on the script tag.

Configuration patterns

Object on window

The recommended pattern. Set before the bundle script tag:

html
<script>
  window.InviaroSettings = {
    key: 'wt_...',
    origin: 'https://yourdomain.com',
    themeMode: 'auto'
  };
</script>
<script src="https://widget.inviaro.com/v1.js" async></script>

Data attributes

html
<script
  src="https://widget.inviaro.com/v1.js"
  data-key="wt_..."
  data-origin="https://yourdomain.com"
  data-theme-mode="auto"
  data-position="bottom-right"
  async
></script>

The two methods can be mixed. window.InviaroSettings always wins when both are present.

Identity and visitor info

SettingTypePurpose
userIdstringStable user id from your auth system. Pair with userHash for verification.
userHashstringHMAC-SHA256 of userId, computed server-side. See Identity verification.
userEmailstringVisitor email. Used as fallback when no pre-chat form.
userNamestringVisitor display name.

Display

SettingDefaultValues
themeMode'auto''auto', 'light', 'dark'
position'bottom-right''bottom-right', 'bottom-left', 'bottom-center'
zIndexhigh defaultAny integer. Lower it to sit below your modals.
mode'standalone''standalone', 'embed' (full-pane, no launcher)
hideOnPagesundefinedGlob patterns, e.g. ['/checkout/*'].
hideOnMobilefalseHide on viewports below 768px.
localeauto'en', 'bs'. Auto-detects from navigator.language.

Brand

ts
brand?: {
  name?: string;
  logoUrl?: string;
  greeting?: string;
  subheading?: string;
  hideFooter?: boolean;
  privacyUrl?: string;
  preChat?: {
    requireName?: boolean;
    requireEmail?: boolean;
    prompt?: string;
  };
}
SettingDefaultPurpose
privacyMode'balanced''strict', 'balanced', 'fast', 'none'. See Privacy and consent.
consentundefinedSet false to force memory-only mode and suppress page-context capture.
noStoragefalseEquivalent to privacyMode: 'none'.

Session

SettingDefaultPurpose
sessionIdautoOverride the generated session id. Useful for testing.

Validation

The bundle silently ignores unknown settings. Verify against this reference if a setting does not take effect.

The key and origin fields are required.