Embedding the chat widget
The chat widget adds a floating chat button to your website, allowing visitors to ask questions and get AI-powered answers based on your content. It appears as a small button in the corner of the page and expands into a conversational interface when clicked.
Basic installation
Section titled “Basic installation”Add a single script tag to your site, typically before the closing </body> tag:
<script src="https://ai.quantcdn.io/v1/widget.js" data-site-id="YOUR_SITE_ID" data-position="bottom-right" data-theme="light"></script>Replace YOUR_SITE_ID with your project’s site ID.
Configuration options
Section titled “Configuration options”Customise the widget behaviour using data attributes on the script tag:
| Attribute | Required | Default | Description |
|---|---|---|---|
data-site-id | Yes | — | Your project’s site ID |
data-position | No | bottom-right | Widget position: bottom-right or bottom-left |
data-theme | No | light | Colour theme: light or dark |
Dark mode
Section titled “Dark mode”Set data-theme="dark" to match dark-themed sites:
<script src="https://ai.quantcdn.io/v1/widget.js" data-site-id="YOUR_SITE_ID" data-position="bottom-right" data-theme="dark"></script>The dark theme adjusts the widget background, text colours, and input styling to suit dark user interfaces.
Next steps
Section titled “Next steps”- Search page — Embed a full search interface for a dedicated search page
- Settings — Configure allowed domains and rate limits