Site widget
The widget adds an online chat button to your site. Visitors write in the chat, and your AI agent replies. The same code collects traffic figures, which appear under Analytics → Site.
Step 1. Add your site address
- Open Analytics → Site.
- In the "Your sites" block, click "Add site".
- Enter a name and an address, for example
https://example.com.
The address must be exact: with the https:// protocol, without a path and without a trailing /. If the site opens with www in the browser, enter the address with www.
The widget works only on the addresses you list. On any other site the code sends nothing.
Step 2. Check that the chat has an agent
The "Online chat" channel is created automatically when you add a site. If you have one active agent, it connects to the chat on its own. If you have several active agents or none, visitors see a request form instead of the chat until an agent is assigned to the channel.
Step 3. Copy the code
In the site card, open the "Installation code" block and copy the code. The site key inside it is not secret, but do not change it without need: otherwise you would have to update the code on every page.
Set up the look of the widget
Everything visitors see is set in the “Site widget” block of the same site card. The preview on the right opens like the real widget when you click its button.
| What | How to set it up |
|---|---|
| Channels and order | Turn channels on and off with the switches and reorder them by dragging the handle on the left (on a phone, with the “Up” and “Down” buttons). Online chat is a list row like the messengers: put it anywhere or turn it off |
| Colors | Button color and the color of the mark on it |
| Position and reveal | Button on the left or right; the panel opens up or sideways from the button |
| Channel look | “Icon + name” or “Icon only” |
| Header | Photo (a cropper to a 300×300 square opens after upload), name and greeting |
| Badge and offsets | The number on the button and the distance from the screen edge |
Click “Save widget”: changes appear on your site at once, no need to change the code. The install code only carries the site key, the privacy-policy link and the consent-banner setting — changing those means replacing the code on your site.
Step 4. Paste the code on your site
Paste the code before the closing </head> tag on every page where the widget should appear.
If your site is built with a website builder, look for "Header code", "Head" or "Custom code". There is usually a field for code that runs on all pages.
Step 5. Check it
- Open the site and click the widget button.
- Send a test message.
- The message appears under Conversations → Incoming chats, and the agent replies in the widget.
Visitor consent and cookies
- Visitors decide whether to allow data collection. Without consent, only anonymous figures are collected: page views, drop-offs and conversions, with no identifiers and no profiling.
- The chat works whatever the visitor chooses.
- Enter the link to your cookie policy in the "Policy link" field in the widget settings. While it is empty, the widget links to the Smokva policy page.
- A visitor can withdraw consent at any time through the widget button.
If it does not work
| Symptom | What to check |
|---|---|
| No widget button | The address in step 1 matches the address in the browser: protocol, www and trailing / |
| A request form appears instead of the chat | The "Online chat" channel has no active agent: there are several or none (step 2) |
| Code is pasted but nothing happens | The code sits before </head>, not after </body>; reload the page without cache |
| A messenger is missing from the widget buttons | In the "Site widget" block Smokva shows the reason under the channel list: most often the bot has no public @username or the account handle was not saved. Set a username and reconnect the channel |
| Messages do not reach the cabinet | The "Online chat" channel is active; open "Conversations → Incoming chats" and refresh |