Add the Dchat chat widget to your website
Setup guide · Website
Paste one script tag into your site and the chat window appears on every page. The AI answers from your content, and your team takes over from the same inbox.
Before you start
- Difficulty: Easy
- Time: 2 minutes
- You need: A Dchat workspace (free)
- You need: Access to your site's HTML, theme or tag manager
Steps
Copy your embed code
In Dchat, open Settings → Embed Code. The snippet already contains your widget token.
Paste it before the closing </body> tag
Add it to your site template so it loads on every page. Shopify, WordPress, Webflow, Squarespace and Wix all have a place for custom code; the script is the same everywhere.
<script async src="https://widget.dchat.com/loader.js" data-api="https://api.dchat.com" data-widget-token="YOUR_WIDGET_TOKEN"></script>Allow your domain
Add your site's domain to the allowed domains list for the site in Dchat, so only your pages can load your widget.
Open your site and say hello
The launcher appears in the corner. Ask something your site answers; the conversation shows up in your Dchat inbox straight away.
Good to know
- If your site sends a Content-Security-Policy header, allow widget.dchat.com for scripts and styles, your Dchat API host for connections, and cdn.jsdelivr.net for scripts (the realtime client).
- Each site in your workspace has its own token and can run its own AI agent.
Using a platform with its own app store? The same script works; the platform guides under Solutions show where each one keeps custom code.