Installing a chatbot
Paste the embed code into your website, list the websites it may appear on, and fix it when it doesn't show.
To put a chatbot on your website, you paste one line of code into your pages and tell us which websites may show it. Everything is on the chatbot's Install tab.
The tab has five rows: Add it to your website, Websites, AI model and key, Daily limit and Signed-in customers. Save, at the bottom right, saves the websites, the model and key, and the daily limit. The signed-in customers row saves straight away.
Add it to your website#
- 1
Open the chatbot and select the Install tab.
- 2
Under Add it to your website, click Copy to copy the code.
- 3
Paste it just before the closing
</body>tag on every page where the chat should appear. In a single-page app, put it in the main HTML page once. - 4
Under Websites, list your websites in Website addresses, one per line. Click Save at the bottom.
- 5
Make sure the chatbot is live, then open your website and check that the chat button appears.
The code looks like this. Use your own copy, because the data-bot value is different for each chatbot.
<script src="https://…/widget.js" data-bot="cb_…" async></script>
Most website builders have a "Custom code", "Embed code" or "Footer scripts" setting where you can paste it once for the whole site.
It only shows where you allow it
The chat only appears on the websites listed under Websites, and only while the chatbot is live. Anywhere else, the code does nothing. This stops other people copying your chatbot onto their own site and using up your AI key.
List your websites#
In Website addresses, under Websites, enter one website per line, for example:
https://www.example.com
https://app.example.com
- Only the start of the address counts:
https://www.example.com/helpis saved ashttps://www.example.com. - If you leave out
https://, it's added for you. www.example.comandexample.comare different websites. List both if visitors use both.- A different port counts as a different website, for example
http://localhost:3000for testing on your own computer. - You can list up to 20 websites.
AI model, key and limits#
| Row | Setting | What it does |
|---|---|---|
| AI model and key | AI model | Which model answers. See Creating a chatbot. |
| AI key | The key that pays for answers. It must match the model's provider. | |
| Daily limit | Most questions per day | The most questions all visitors together can ask in 24 hours. Protects you from runaway costs. Starts at 1,000. You can set 1 to 100,000. |
On top of your daily limit, each visitor can send at most 20 questions every 10 minutes.
When a limit is reached, visitors see a short message instead of an answer:
| Limit | What the visitor sees |
|---|---|
| A visitor is sending too fast | "You're sending messages very quickly. Please wait a few minutes." |
| Your daily limit is reached | "This chat is very busy right now. Please try again later." |
Signed-in customers#
This row is for a chat inside your portal, where your server says who is asking. It has the Only signed-in customers may use this chat switch, Create signing secret (or Replace signing secret), and How to set it up, which opens a short guide in a pop-up. Changes here are saved straight away, without the Save button. See Signed-in visitors.
Delete chatbot…, at the bottom left of this tab, removes the chatbot for good. See Creating a chatbot.
Removing the chat from a page#
To stop the chat on a page, remove the code. To hide it for everyone at once, click Switch off at the top of the chatbot's page.
In a single-page app, you can remove it while the page is open, for example when someone signs out:
window.CerberiusChat.destroy();
If the chat doesn't show#
Open your browser's developer console (usually F12, then Console) on the page. The chat leaves a short note there when it can't start.
| What you see | What to do |
|---|---|
| "Help chat is not available on this website. Check the allowed websites in its settings." | Add the website's exact address under Websites, including www if your address has it, and click Save. Also check the chatbot is live. |
| "Help chat: the script tag needs a data-bot attribute" | The code was changed when it was pasted. Copy it again from the Install tab. |
| "Help chat: this chat is only for signed-in visitors, and no sign-in token was given" | Only signed-in customers may use this chat is switched on, and the page didn't give it a token. See Signed-in visitors. |
| Nothing at all | Check the code is on the page, and that your site's security settings allow scripts from the address in the code. |
If the chat button shows but answers fail, check the top of the chatbot's page for a list of what's missing, such as a help source or an AI key. On the Conversations tab, open the chat: a failed answer shows Not answered and the reason.
Test on the real page
After installing, ask a question from your actual website, not just the preview in settings. Then check it appears on the Conversations tab.