What it is
The Public Chat is the simplest way to publish the chatbot: you copy a ready-made snippet and paste it into your site. Any visitor can talk to the bot — no login, no backend, no server configuration.
1. When to use it
| Publication type | When to use |
|---|---|
| Public (Script or Link) | Open websites, landing pages, blogs — any anonymous visitor can talk to the bot. |
| Intranet (Authenticated Access) | Systems where the user has already logged in to your platform. The chat inherits their identity. |
| Login and Password Access | Restricted sites where you want to protect the chat with a shared password. |
Use Public mode when you want:
- Anyone who visits the site to be able to start a conversation;
- Installation to be just copying and pasting a snippet, with no server changes;
- The chat to appear as a floating bubble (or embedded in a fixed area of the page).
2. Setting up on the platform
- Go to your Project → Chatbots menu → select the desired chatbot.
- Click the Publish tab and then the Sites sub-tab.
- Click Add.
- In the “Publish on Websites or Web Systems” modal, fill in:
- Publication name: an internal name to identify this connection (e.g., “Corporate website”);
- Integration type: select “Public (Script or Link)”.
- Click Save Publication.
Done! The new connection appears in the Publications list.
3. What the platform shows after creation
When you expand the publication, you will see the installation snippet ready to copy:
<script>
var carameloaiChatbot = {
publicApiKey: "ct_...",
project_id: "YOUR_PROJECT_ID",
pluginVersion: "PLUGIN_VERSION"
};
</script>
<script src="https://static.carameloai.com/prod/index.js"></script>
To install: paste this snippet before the </body> tag on every page of the site where the chat should appear. That’s it — no backend or server configuration needed.
3.1 Understanding each field in the snippet
| Field | What it is |
|---|---|
publicApiKey | The publication’s public key (starts with ct_). It can be exposed in the HTML without issue — it only allows starting conversations, it gives no access to data. |
project_id | Your project’s identifier. |
pluginVersion | Plugin version, filled in automatically when you copy the snippet. |
containerId | Only appears if you enable “Render in a fixed spot on the page” (see section 6). |
💡 Tip: as you change the visual settings (section 6), the snippet shown on the platform is automatically updated with the corresponding parameters. Copy the snippet after making your adjustments.
3.2 Testing without installing anything
In the publication card title there is an external link button (🔗 icon): it opens a test page with your chatbot running, so you can validate the experience before pasting the snippet into your site.
3.3 Switching the publication’s chatbot
The card itself has a chatbot selector: you can change which bot serves that publication at any time, without changing the snippet installed on the site.
4. How everything connects
┌─────────────────────┐ ┌──────────────────────┐
│ Visitor opens your │ 1. page loads │ Your site │
│ site │ ─────────────────────▶ │ (chat script │
└─────────────────────┘ │ pasted in the HTML) │
└──────────┬───────────┘
│ 2. script generates an
│ anonymous ID for the visitor
▼
┌──────────────────────┐
│ Caramelo API │
│ → validates the │
│ public key │
│ → creates the chat │
└──────────┬───────────┘
│ 3. chat available
▼
┌──────────────────────┐
│ Chat bubble in the │
│ corner of the │
│ screen, ready to use│
└──────────────────────┘
In summary:
- The visitor opens a page on your site;
- The chat script loads and creates an anonymous identifier for that browser;
- The platform validates the public key and opens the conversation;
- The chat bubble appears in the corner of the screen.
5. How the visitor is identified
Unlike Intranet mode, there is no login here: the platform automatically generates an anonymous ID (e.g., user-a1b2c3...) that is stored in the visitor’s browser.
| Situation | What happens |
|---|---|
| Visitor returns to the site in the same browser | The previous conversation is recovered — the history continues. |
| Visitor switches browser or device | They become a “new” visitor, without the previous history. |
| Visitor clears browser data | They lose the link to the previous conversation. |
📌 Need to know who the visitor is? You can configure the chatbot to ask for details (name, email, phone) during the conversation. And if your site has a logged-in area and you want identity guaranteed by your system, the right mode is Intranet (Authenticated Access) — see the specific guide.
6. Chat visual settings
In the publication card, “Settings” column, you can adjust the widget’s behavior (click Save after changing):
Chat position on the site: screen corner where the bubble appears;
Start and keep the conversation box open: the chat stays always open, with no close option;
Compact Mode: the chat takes up the smallest possible size;
Attention Retention: after a period of inactivity (default 10 seconds, adjustable in “Absence Timer”), the browser tab draws attention and the chat glows to bring the visitor back;
Retention with hidden start: the chat does not load right away — it only appears after a period of inactivity (set in “Waiting time”), drawing attention in the same way;
Render in a fixed spot on the page: instead of floating, the chat is displayed inside an area of yours. When enabled, the platform shows a
<div>snippet for you to paste where the chat should appear:<div id="chatbox_PUBLICATION_ID"></div>
⚠️ Heads up: “Attention Retention” and “Hidden start” are options that mutually disable each other — checking one unchecks the other.
7. Frequently asked questions
Do I need to change the server or hire a developer?
No. Installation is just pasting the snippet into the site's HTML. On platforms like WordPress, Wix or similar, use the "custom code/HTML" option before the </body> tag.
Can the public key (ct_...) appear in the page code?
Yes. It was made for that: it only allows starting conversations. Whoever has the key cannot access conversations, reports or settings.
Does the chat work with any website technology?
Yes — plain HTML, WordPress, React, Vue, etc. As long as the script loads on the page.
On how many pages can I place it?
As many as you want. The snippet is the same for all pages of the site.
Can I have different publications for different sites?
Yes — and it is recommended. Create one publication per site/environment to control and delete each one separately.
How do I remove the chat from a site?
Delete the publication on the platform (Delete button) — the installed script stops working immediately. Then remove the snippet from the site.