To add live chat to your website, paste a small piece of embed code into your site, just before the closing </body> tag. Then publish the site and test the chat in a private browser window. The chat button appears on every page that contains the code.
You do not need to build anything. On a website builder you paste the code into a settings field, and on a hand-coded site you paste it into your HTML or shared footer. The exact field for each platform is listed below.
The live chat embed code
This is the Asyntai live chat script. Your own copy is in the Embed Code section of your dashboard.
<script>(function(){var l=function(){var s=document.createElement("script");s.src="https://widget.asyntai.com/static/js/chat-widget.js";s.async=true;s.setAttribute("data-asyntai-id","YOUR_WIDGET_ID");document.head.appendChild(s)};if(document.readyState==="complete"){l()}else{window.addEventListener("load",l)}})();</script>
This is only an example. Copy the code from your dashboard, because YOUR_WIDGET_ID must be your real ID.
The script takes one value, your widget ID, and it loads asynchronously. Colours, position and the welcome message are not in the code. You change them in the dashboard, so you only paste the code once. Taking a chat widget off a site later is a different job with three parts; see how to remove a live chat agent.
Where to paste it on your platform
| Your website | Where the code goes | Full guide |
|---|---|---|
| WordPress | The Asyntai plugin needs no code. Or paste the code into the Footer section of the WPCode plugin. | WordPress |
| Shopify | The Asyntai app with its app embed in your theme settings, or the code in theme.liquid. | Shopify |
| Wix | Settings, then Custom Code, set to All pages and Body - end. | Wix |
| Squarespace | Pages, then Custom Code, then Code Injection, in the Footer box. | Squarespace |
| Webflow | Site Settings, then Custom Code, in the Footer Code box. | Webflow |
| Hand-coded HTML | Before </body> on each page, or once in a shared footer file. | HTML |
| React, Vue or Angular | In your index.html before </body>, or loaded from a component. | Apps |
Another platform? The installation page has guides for many more. Most builders have a Custom Code or Code Injection field that adds a script to all pages.
WordPress
- Go to Plugins → Add Plugin and search for Asyntai. Install and activate it.
- Open Asyntai AI Chatbot in the WordPress sidebar and click Get started.
- Sign in to your Asyntai account in the window that opens. Your site is now linked.
- If you use a caching plugin, purge its cache.
For staff replies and page builders, read how to add live chat to WordPress.
Shopify
- In your Shopify admin, go to Online Store → Themes.
- Click the three dots next to your theme and select Edit code.
- Under Layout, open theme.liquid.
- Press Ctrl+F and search for
</body>. Paste your code just before it. - Click Save.
If you prefer not to edit code, install the Asyntai app from the Shopify App Store instead. See Asyntai for Shopify.
Wix
- Open your site's dashboard and click Settings.
- In Development & integrations, click Custom Code, then + Add Custom Code.
- Paste your code and give it a name.
- Select All pages and Body - end, then click Apply.
Wix offers Custom Code on published sites with a connected domain, which needs a Premium plan. Without one, you can use an Embed HTML element on each page, but Wix shows it as an iframe. The chat then stays inside the box and does not float over the page, so make the box large enough for the open chat window. More in how to add live chat to a Wix website.
Squarespace
- Open your site and click Pages, then Custom Code at the bottom of the panel.
- Click Code Injection and scroll to Footer.
- Paste your code and click Save.
Code Injection needs a Core, Plus or Advanced plan, or an older Business or Commerce plan. On Squarespace 7.0 it is under Pages, then Website Tools. Code sometimes does not run while you are logged in to Squarespace, so check the result in a private window.
A hand-coded website
- Open your HTML file and find the closing
</body>tag. - Paste your code just before the tag and save the file.
- Upload the file. Repeat for each page, or put the code in a footer file that all pages include.
The chat needs a page served over HTTP or HTTPS. It does not work on a file that you open directly from your computer, so use a local server for tests.
Decide who answers before you go live
The code puts a chat window on your site. Someone still has to answer it. With traditional live chat, that someone is a member of your staff, and visitors wait when nobody is online. Asyntai works differently: its AI answers first, from your own pages, and your team joins when a person is needed.
Included on all plans.
The AI reads your website with the crawler and answers visitors from your pages, FAQs and files, also when your team is away.
Standard plan and above, $139 a month.
With Human Takeover, you open a conversation in Live Monitoring and click Take Over Chat. The AI stops and you reply. The visitor sees a Live Agent indicator.
Standard plan and above.
With Escalation, you get an email with a link to join the chat. Set business hours, and outside them the AI asks for an email address and passes the message to your team.
The Free plan includes 50 messages a month, Starter 800 at $39, Standard 15,000 at $139 and Pro 50,000 at $449. One message is one AI reply. See the pricing page for what each plan includes.
Implementing a live chat feature yourself
Some developers search for how to implement a live chat feature because they plan to build one. It is possible, and the chat window is the smallest part of the work. You also need:
- A connection that stays open, usually WebSockets, with reconnects when a phone loses signal
- Message storage, and a way to keep a conversation when the visitor moves to another page
- An inbox for your staff, with alerts for new chats
- A plan for messages that arrive when nobody is online
- A layout that works on small screens and does not cover your own buttons
All of this needs upkeep after launch. If your goal is to answer visitors, an embed script is the shorter path. If you need your own interface, the Asyntai REST API, on Starter and above, sends a message to your AI and returns its answer.
Test it like a visitor
- Check the answers first. Use the Test Chat in your dashboard. Its messages do not use your monthly quota.
- Open a private window. Go to your site. The chat button appears in the bottom right corner by default.
- Ask something only your site can answer, such as "Do you deliver to Norway?" or "Are you open on Saturday?"
- Find the chat in your logs. If the conversation is in your chat logs, the widget is connected to your account.
- Try a real phone. Check that a cookie banner or sticky menu does not cover the button.
If the chat does not appear
| What you see | What to do | Likely cause |
|---|---|---|
| No button after you save | Publish the site. Then open it in a private window and clear your cache. | Unpublished or cached page |
| Nothing in the page source | Search the source for data-asyntai-id. If it is missing, paste the code again into a code field and not a text block. | The code was not saved |
| Script blocked in the console | Allow widget.asyntai.com, asyntai.com and flagcdn.com in your Content Security Policy. | Strict security header |
| Missing only in your browser | Test in a clean browser profile. | Ad blocker or extension |
| Missing on one page | Check your Exclude Pages list and whether that page uses a separate template. | Excluded page or other template |
Press F12 to open the browser console. It usually names the problem when a script fails to load.
After the install
You make these changes in the dashboard, with no new code on your site.
- Greeting: write your own first message. "Do you have a question about delivery?" says more than "Hi".
- Look: set colours and position on Starter and above.
- Where it shows: hide the chat on pages such as checkout with Exclude Pages, on all plans. Enter the full URL, because the match is exact.
- How it opens: add your own "Chat with us" link with a custom open button, which calls
window.AsyntaiWidget.open(). - Leads: collect email addresses and phone numbers in the chat on Starter and above.
To plan staffing and goals, read our live chat strategy guide.
Frequently asked questions
Do I need a developer to add live chat?
Usually not. On WordPress and Shopify you can use the Asyntai plugin or app, and most website builders have a field for custom code. A developer helps if your site has a strict Content Security Policy or a custom build process.
Can I add live chat to a website for free?
Yes. The Asyntai Free plan has 50 messages a month for one website, and the AI answers visitors. Replying as a person needs Human Takeover, from the Standard plan.
Should the script go in the head or the body?
Put it just before the closing </body> tag. That is the placement in all our installation guides.
Can I use the same code on several websites?
Each website gets its own widget. Your plan sets the number: 1 on Free, 2 on Starter, 3 on Standard and 20 on Pro.