Script tag attributes are the fastest way to get started. For dynamic configuration — such as changing colors based on the page or passing user metadata — use the programmatic API instead.
For full control, create a widget instance with the JavaScript API:
const widget = new IllumiChat.Widget({ assistantId: 'YOUR_ASSISTANT_ID', position: 'bottom-right', branding: { primaryColor: '#6366f1', companyName: 'Acme Corp', launcherSize: 60 }, autoOpen: 3000, suggestedMessages: [ 'How can you help me?', 'Tell me about pricing', 'I need technical support' ], metadata: { page: window.location.pathname, userId: '12345' }, session: { persist: true }, authMode: 'anonymous'});await widget.initialize();
When using the programmatic API, do not include data-assistant-id on the script tag. The script’s auto-initialization runs only when that attribute is present.
The default mode. Visitors are tracked by an automatically generated visitor ID stored in the browser. No login required. Best for public-facing websites.
A hybrid mode. If the visitor is already logged in through Auth0 on your site, the widget uses their authenticated identity. Otherwise, it falls back to anonymous mode.