Embed Script

Add a chat widget to any website with a single script tag.

Installation

Add the following script tag to your website's HTML, just before the closing </body> tag:

<script
  src="https://your-domain.com/widget.js"
  data-agent-id="your-agent-id"
  defer
></script>

Configuration Options

Customize the widget behavior with data-* attributes:

AttributeTypeDefaultDescription
data-agent-idstringYour agent's unique ID (required)
data-themelight | dark | autoautoWidget color theme
data-positionbottom-right | bottom-leftbottom-rightWidget position
data-welcomestringOverride the welcome message
data-expandedbooleanfalseStart with the widget open

Example

<script
  src="https://your-domain.com/widget.js"
  data-agent-id="abc123"
  data-theme="dark"
  data-position="bottom-right"
  defer
></script>

Content Security Policy

If your site uses a CSP, add the following directives:

script-src 'self' https://your-domain.com;
frame-src 'self' https://your-domain.com;
connect-src 'self' https://your-domain.com;

On this page