Add live chat to your website
Visitors open a chat bubble in the corner of your pages and send you a message. You read and answer it in the dashboard, under **Live chat** > **Inbox**. Installing takes about five minutes: you paste one line of code into your site.
Before you start
- Your plan includes live chat. Live chat is part of the paid plans. On the free plan the Live chat page shows “Not on your plan” with a link to the plans.
- You saved the widget once. Open Live chat > Widget. Set the title, greeting and color, then click Save. The install code appears after the first save.
- The chat is turned on. In the Widget tab, turn on Show the chat on my website.
Step 1: Copy your install code
Open Live chat > Install and click Copy code. The code is one line and looks like this:
<script async src="https://cmskite.com/livechat.js" data-cmskite-chat="YOUR_WIDGET_ID" data-api="https://api.cmskite.com"></script>YOUR_WIDGET_ID is different for every website, so always copy the code from your dashboard. See Where to find your widget ID below. The code holds no password or secret key, so it is safe on a public page.Where to find your widget ID
YOUR_WIDGET_ID in the example code is only a placeholder. Your real widget ID is already inside the code that you copy from the dashboard, so if you paste that code you do not need to look for the ID. You need the ID on its own only when you build the tag yourself, for example in Next.js or React. Find it like this:
Open the right website
Sign in to CMSKite and choose the website that should show the chat. Every website has its own widget ID.
Open Live chat
In the left menu, click Live chat.
Save the widget once
Go to the Widget tab. Set the chat title, greeting and color, and click Save. The widget ID is created on this first save. Until then, the Install tab shows "Save the widget first".
Open the Install tab
Go to the Install tab. Your install code is shown in a box, with a Copy code button next to it.
Read the ID from the code
The widget ID is the value of
data-cmskite-chat, between the quotes. It starts withlcw_, followed by 32 letters and numbers. For example:htmldata-cmskite-chat="lcw_0a1b2c3d4e5f60718293a4b5c6d7e8f9"
The ID in the example above is not a real ID. Use the one from your own dashboard.
The widget ID does not change when you change the title, greeting, color or allowed websites. You do not need to update your site after you change these settings.
lcw_, with no spaces or extra quotes. Check that the ID comes from the same website in CMSKite. If you use the ID of another website, the chats go to that other website's inbox.Step 2: Paste the code into your site
Paste the code once, just before the closing </body> tag, in the place every page shares: the footer or the main template. If you paste it into one page only, the chat shows on that page only. Do not paste it twice on the same page.
| Platform | Where to paste |
|---|---|
| Plain HTML | Each HTML file (or your shared footer), on the line above </body>. Upload the changed files. |
| WordPress | A header and footer plugin such as WPCode: paste into the Footer box. Or Appearance > Theme File Editor > footer.php, above </body> (use a child theme). Clear your cache plugin after. |
| Webflow | Project settings > Custom code > Footer code. Save, then Publish. Custom code does not run in the designer. |
| Shopify | Online Store > Themes > ... > Edit code > layout/theme.liquid, above </body>. Save. |
| Wix | Settings > Custom code > Add custom code. Choose All pages, Load code once and Body - end. Needs a connected domain and a paid Wix plan. |
| Squarespace | Settings > Advanced > Code injection (or Website > Pages > Custom code), in the Footer box. |
| Google Tag Manager | A new Custom HTML tag with the trigger All Pages. Submit and publish the container. |
| React (Vite, CRA) | index.html, above </body>. |
In Next.js, load the script once in the root layout, not inside a page component, or the chat can load more than once. In app/layout.tsx:
app/layout.tsx
import Script from "next/script";
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
<body>
{children}
<Script
src="https://cmskite.com/livechat.js"
data-cmskite-chat="YOUR_WIDGET_ID"
data-api="https://api.cmskite.com"
strategy="afterInteractive"
/>
</body>
</html>
);
}Step 3: Publish and check
Publish your site
Publish or deploy the change, then open one of your pages in a normal browser window.
See it installed
Go back to Live chat > Install. Within about a minute the status turns Installed, and Last seen on shows the page address.
Send a test message
On your site, click the chat bubble, enter a name and send a message.
Reply from the inbox
Open Live chat > Inbox. Your message is there. Reply, and the answer shows in the chat on your site.
The chat remembers the visitor in that browser. After a reload or a later visit, the conversation is still there.
Choose which websites can show the chat
In the Widget tab, Websites allowed to show the chat controls where the chat works. With an empty list it works on any website that has your code. With entries it works only on those websites.
Add the domain only, without https:// or a path, for example example.com. A domain also covers its subdomains, such as www.example.com and shop.example.com. Add your own domains, so nobody can copy your code to another website. A refused website shows under Last blocked in the Install tab.
Chat not showing?
- Not on your plan. The Install tab says so. Upgrade from See plans.
- The chat is turned off. Turn on Show the chat on my website in the Widget tab and save.
- Your website is not allowed. Add it to the allowed list, or empty the list. Last blocked shows which website was refused.
- The code is not on the page. View the page source and search for
livechat.js. If it is missing, the code was not saved, the site was not published, or a cache shows an old copy. - A content security policy blocks it. Allow the
srcaddress (for examplehttps://cmskite.com) inscript-src, and thedata-apiaddress (for examplehttps://api.cmskite.com) plushttps://api.byotalk.comandwss://rt.byotalk.cominconnect-src. - An ad blocker hides it. Try a private window with extensions turned off.
Still stuck? Contact support with the page address and a screenshot of the browser console.
Good to know
- It does not slow your page. The script loads with
async. - It does not change your site’s look. The chat runs in its own isolated box, so your CSS and its CSS never mix.
- Messages are plain text. HTML or scripts in a message are never run.
- Visitor data. The chat keeps a small visitor record in the browser’s local storage. Names and messages are stored in your CMSKite workspace. Mention the chat in your privacy policy.
- To remove it, delete the code. To stop it at once, turn off Show the chat on my website.