Skip to content
Clovieby deleguj AI

Configuration

Widget on your website

How to embed Clovie with one script, why you need the list of allowed domains and what you can change in its look.

You embed Clovie with one <script> tag. You don't need to change your template, install a plugin or ask a developer for help. It works on WordPress, Shopify, Wix, Webflow and in your own code.

As of: 2026-11-07.

Snippet

You'll find the ready-made code in the assistant setup, in the Installation step:

<script src="https://clovie.pl/embed/v1.js" data-key="pk_live_YOUR_KEY" async></script>

Paste it before the closing </body> tag. The async attribute makes sure the script doesn't block the page from loading.

data-key is a public key: it's visible in your website's source code, and that's how it should be. It doesn't give access to the dashboard or to conversations; it only tells us which assistant to load.

Allowed domains: without them, the widget won't start

In the same step, you enter the list of domains where the assistant is allowed to run: one full address per line:

https://your-company.com
https://www.your-company.com
http://localhost:3000

Each time it starts, the widget compares the page address with this list. If the domain isn't on it, the assistant won't load.

This is a safeguard, not a formality: without it, someone could paste your snippet on their own website and use up your conversation limit. The limits described in conversations and limits also protect you against conversations started automatically outside the browser. Remember that https://your-company.com and https://www.your-company.com are two different addresses for the browser. If your website works under both, add both.

How it looks and what you can change

The widget renders in a Shadow DOM, that is, in an isolated tree. In practice, this means your website's styles won't affect how the chat looks, and the chat's styles won't break your website, even if you use a theme with aggressive CSS.

In the Appearance step, you set:

Setting What it's for
Window size Compact, Standard, Large or Custom
Main color Accents, icons and borders (match it to your brand)
Light or dark mode Independent of your website's theme
Widget position Bottom right or bottom left corner
Placeholder and text under the input Text in the input field and below it
Chat window language Polish, English or automatic, based on the page language

Chat window language

The chat's buttons, hints and messages are in Polish or English. The widget chooses the language in this order:

  1. The language set in your website's code: the data-lang attribute in the snippet or window.Clovie.setLanguage().
  2. The language set in the Appearance step (the Chat window language field).
  3. The page language from the lang attribute of the <html> tag. A page in a language other than Polish or English gets English.
  4. Without any of this information: Polish.

The setting applies only to the chat interface. The welcome message, action buttons and placeholder appear exactly as you enter them in the setup, and the assistant replies in the language the visitor writes in. An empty placeholder shows the widget's text in the window language: “Napisz wiadomość…” or “Type a message…”.

A website with a fixed language can set it in the snippet:

<script src="https://clovie.pl/embed/v1.js" data-key="pk_live_YOUR_KEY" data-lang="en" async></script>

Quick questions

Below the welcome message, you can add up to six buttons with the most common questions (Basics step → Action buttons). The visitor clicks instead of typing.

This is the simplest way to steer the conversation to where the assistant is strongest. It's worth entering the questions you get by email several times a week. After the first week, you can easily pick them out of the conversations in the dashboard.

Accessibility

You can use the chat with the keyboard alone and with a screen reader:

Visitor's action What the chat does
Tab to the chat button and Enter Opens the window, focus goes to the input field (on a phone, to the window itself, so the on-screen keyboard doesn't pop up)
Esc Closes the conversation history, then the chat window; focus returns to the button that opened it
Waits for a reply The screen reader reads out the finished reply of the assistant or the agent. The visitor's messages and the earlier part of the conversation aren't read again
Has reduced motion turned on in the system The window opens without sliding and scaling, and the message list scrolls without animation

The chat window doesn't block the page: you can Tab back to its content, and the chat stays open.

Appointment booking (Appointments module)

A salon with the Appointments module can show a booking step in the widget: service, person, time and the customer's details. The appointment goes straight to the calendar in the dashboard, and the customer gets an email with a link to change it. Module description: Appointments, the “Booking page” part.

  • With the AI chat assistant. When the salon booking page is on, the assistant widget shows a Book an appointment row instead of “Book a consultation”. The snippet stays the same.
  • Without the AI assistant (booking-only mode). The snippet has the data-booking attribute with the booking page address instead of data-key. The ready code is in the dashboard, on the Booking page screen:
<script src="https://clovie.pl/embed/v1.js" data-booking="your-business" async></script>

In booking-only mode the corner button opens the booking window in the colours of the booking page theme (Universal or Salon). The list of allowed domains is not needed: the booking page is public, and attempt limits protect it from abuse. A turned-off booking page or a changed page address removes the widget from your website, so paste the new code after changing the address.

API for developers (optional)

The widget registers a global window.Clovie object on the page. It's the only supported way to control the chat from your own code, for example from an “Ask the assistant” button in the page content:

Call Effect
window.Clovie.open() Opens the chat panel (if it's closed)
window.Clovie.send("text") Opens the panel and sends a message on the visitor's behalf; when the previous conversation has ended, starts a new one
window.Clovie.setLanguage("en") Changes the chat window language ("pl", "en"); "auto" goes back to the dashboard setting and the page language. Useful when the language switcher on your website doesn't reload the page

In booking-only mode, window.Clovie.open() and window.Clovie.send() open the booking window (the message text is ignored because there is no chat), and window.Clovie.setLanguage() works the same way.

When the call comes from a visitor's gesture (a click or a key press), the keyboard focus moves to the chat window, and after closing it with Esc, it returns to your button. Opening without a gesture, for example from a timer or right after the page loads, doesn't take focus away from a field someone is typing in.

The script loads asynchronously, so before calling it, check whether the object already exists, or try again after a moment:

<button onclick="if (window.Clovie) window.Clovie.send('I want to book a consultation')">
  Ask the assistant
</button>

The widget mounts in a <div id="clovie-root"> element with an open Shadow DOM. The inside of this tree (classes, structure) isn't part of the API and can change without notice; from your own code, use only window.Clovie. Changes to this API are announced in the changelog as widget changes.

Publishing

The assistant works on your website only after you publish it (Test and publish step). Until then, it has the draft status, and the widget won't load it. This way you can safely set it up on your production domain.

When the widget doesn't show up

Symptom Most common cause
Nothing happens, no button A domain that isn't on the allowed list, or an unpublished assistant
The button is there, but the chat doesn't reply The conversation pool has run out (check the dashboard)
“Loading…” that never ends The script is blocked (ad blocker, CSP on your website)
The appointment booking step has no Cloudflare verification and the Book appointment button stays inactive CSP on your website blocks the Clovie frame: allow https://clovie.pl in frame-src

In the browser console (F12 → Console), you can see a message that tells you which of these cases applies.