Copy the embed code
- In My Chatbots, click your chatbot. The dashboard selects it and opens Customizer.
- Scroll to Get Embed Code.
- Choose a tab and click Copy Code.
HTML script
</body> tag on every page where the chat should appear. If your site has a shared footer or layout template, paste it there once.
The script adds a chat bubble 20 px from the bottom-right corner, on top of your page’s content. Clicking it opens a chat panel about 380 × 640 px. If the tag appears twice on a page, the second copy does nothing. The position of the bubble can’t be changed yet.
Script options
Next.js
IFrame
height: 640px.
Where the widget is allowed to load
- With
https://acme.com, the widget works onacme.com,www.acme.com, andhelp.acme.com. - With
https://www.acme.com, it works onwww.acme.combut not onacme.com. If your site answers on both, enter the domain withoutwww. - It always works on
localhostand127.0.0.1, so you can test before you publish.
Content Security Policy
If your site sends aContent-Security-Policy header, add the widget’s origin to two directives, next to the sources you already allow:
Troubleshooting
The bubble doesn't appear
The bubble doesn't appear
- Open your published page, view its source, and search for
embed.js. Site builders often need you to publish again after you add code. - Open the browser console.
CustomerGPT: Missing data-widget-id attribute on script tag.means the attribute was lost, often because a plugin rewrote or combined your scripts. Excludewidget.customergpt.ai/embed.jsfrom that plugin. - An error that mentions Content Security Policy means your CSP blocks the widget. See Content Security Policy.
The panel says Embedding not allowed on this origin
The panel says Embedding not allowed on this origin
The page’s domain doesn’t match the chatbot’s Website Domain Link. See Where the widget is allowed to load.
The bot greets visitors with “Hello! I am CustomerGPT” instead of my welcome message
The bot greets visitors with “Hello! I am CustomerGPT” instead of my welcome message
The widget couldn’t load your chatbot’s settings, usually because the Widget ID in the code is wrong. Copy the code again from Customizer.