Appearance
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
| Setting | Type | Purpose |
|---|---|---|
userId | string | Stable user id from your auth system. Pair with userHash for verification. |
userHash | string | HMAC-SHA256 of userId, computed server-side. See Identity verification. |
userEmail | string | Visitor email. Used as fallback when no pre-chat form. |
userName | string | Visitor display name. |
Display
| Setting | Default | Values |
|---|---|---|
themeMode | 'auto' | 'auto', 'light', 'dark' |
position | 'bottom-right' | 'bottom-right', 'bottom-left', 'bottom-center' |
zIndex | high default | Any integer. Lower it to sit below your modals. |
mode | 'standalone' | 'standalone', 'embed' (full-pane, no launcher) |
hideOnPages | undefined | Glob patterns, e.g. ['/checkout/*']. |
hideOnMobile | false | Hide on viewports below 768px. |
locale | auto | '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;
};
}Privacy and consent
| Setting | Default | Purpose |
|---|---|---|
privacyMode | 'balanced' | 'strict', 'balanced', 'fast', 'none'. See Privacy and consent. |
consent | undefined | Set false to force memory-only mode and suppress page-context capture. |
noStorage | false | Equivalent to privacyMode: 'none'. |
Session
| Setting | Default | Purpose |
|---|---|---|
sessionId | auto | Override 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.