How to add an AI chatbot to a Wix site (custom code, step by step)

Updated November 6, 2026

The exact Wix dashboard path for adding an AI chatbot or live chat with a script snippet, which pages to load it on, what to check on mobile, and how to test it before customers see it.

You can add an AI chatbot to a Wix site in about ten minutes, and most of that time is spent deciding things rather than clicking. Any chat tool that installs with a script snippet goes in the same place: Wix's Custom Code settings in your site dashboard. This guide walks through that path as Wix documents it today, plus the parts the vendor guides skip: the requirements that block people, which pages the chat should load on, consent settings, mobile checks, and the tests to run before you trust it.

First, decide between Wix's own chat app and a third-party chatbot. Wix has its own app, Wix Smart Chat, installed from the Wix App Market. Wix describes it as AI chat and manual chat in one app, and it replaces the older Wix AI Site Chat, which new sites can no longer install. If you want something native that lives inside the Wix dashboard, try it first. A third-party AI chatbot makes sense when you need answers grounded in documents and help articles that do not live on your Wix site, a shared inbox for a team, or the same assistant on other channels and other websites.

Check the two requirements before you start. Wix's help article says custom code can only be added to a site that is published and has a connected domain. Wix also says you must upgrade your site before you can connect a domain, so in practice a free site on a wixsite.com address will not get you there. If you do not see Custom Code in your settings, this is almost always the reason. Upgrade, connect the domain, publish once, then come back.

Copy the snippet from your chat tool. Every script-based chatbot gives you a short block of code, usually one script tag with an account or widget token in it. Copy all of it, including the opening and closing tags. A snippet that is missing its last few characters is the most common reason a widget silently fails to appear. While you are in the chat tool, look for an allowed-domains setting and add your Wix domain, with and without www, so nobody else can load your widget on their site.

Add the code in Wix. In your site's dashboard, go to Settings, then click Custom Code in the Development & integrations section. Click + Add Custom Code at the top right and paste the snippet into the text box. Give it a name you will recognize in a year, such as 'AI chat widget (vendor name)'. These labels come from Wix's current help article; if Wix moves things around, search the dashboard for 'Custom Code'.

Choose the pages. Under Add Code to Pages, Wix offers All pages or Choose specific pages. All pages also covers pages you create later, and Wix then asks whether the code loads once per visit or on each page the visitor opens. For a chat widget, loading once is the usual choice, because it avoids restarting the widget on every click. If your vendor says otherwise, follow the vendor. If the bubble vanishes after visitors move between pages, switch to loading on each page.

Pick where the code goes. Under Place Code in, the options are Head, Body - start and Body - end. Use whatever your chat vendor specifies. If the vendor does not say, Body - end is the safe default for a chat widget: it loads after your page content, so it does not hold up the first paint. Wix's own guidance is the same in general terms: tracking and verification codes go in the head, other functional scripts in the body. Click Apply.

Set the code type for cookie consent. Wix treats custom code as Essential by default, which means it loads before a visitor gives consent and cannot be turned off by them. Wix asks site owners to change the category when another one fits better, under the Code Type tab when you add or edit the snippet. A support chat widget is usually Functional. The tradeoff is real: if you mark it Functional and a visitor declines functional cookies, they will not see the chat. Decide with whoever owns your privacy policy, and make sure that policy names the chat provider.

Should the chat go on every page? Usually yes for support, but not blindly. The chat earns its keep on pages where people hesitate: pricing, booking, product and service pages, shipping and returns, contact. Paid-ad landing pages where you want one action and nothing else, and pages your team would rather keep distraction-free, can go without it. With Choose specific pages you can start with the four or five pages that generate most of your questions, then widen once the answers are good.

Remove the chat you are replacing. Two chat bubbles in the same corner looks broken and splits your conversations. If Wix Chat or Wix Smart Chat is on the site, turn it off or remove it before you publish the new widget. The same goes for an older snippet from a previous vendor still sitting in Custom Code. Wix lists every snippet with an on/off toggle, which makes this a two-minute cleanup.

Publish, then test on the live site. Wix states that custom code does not run in the editor; it only runs on the published site. So preview mode will not show your chatbot. Publish, open your real domain in a private browser window, and wait for the bubble. If nothing appears, check three things in order: the snippet is complete, the page you are on is included, and the domain matches what you allowed in the chat tool.

Check it on a phone, not just a narrow browser window. Open the site on an actual phone and look for collisions: the chat bubble covering a sticky 'Book now' button, a cookie banner, a back-to-top arrow or another floating widget. Open the chat and type a question with the keyboard up; the message box should stay visible. Rotate the phone once. If your chat tool lets you move the bubble or offset it from the edge, use that rather than hiding it on mobile, because mobile is where a lot of your visitors are.

Run five real conversations before you call it done. Ask a question your content clearly covers and check the answer against the page. Ask one it does not cover; a good AI chatbot says it does not know and offers a person instead of guessing. Ask for a refund or to cancel, which should reach a human. Send a message outside business hours and see what the visitor is told. Finally, ask for a human outright and confirm the message actually lands somewhere your team watches.

Know the limits of a pasted snippet. Wix says custom code runs only in the browser and cannot read Wix page elements, data collections or business solutions such as Stores or Bookings. That means a chat widget installed this way does not see your Wix orders or bookings by itself. If you need the bot to answer 'where is my order', you need a tool that connects to your order data another way, or a Wix App Market app built for that.

Troubleshooting that saves an hour. If your site misbehaves after adding code, use the toggles in Custom Code to switch snippets off one at a time and retest after each. Wix notes that it applied new frontend security measures in December 2025 that can block some older snippets until the provider updates them, so an old copy-pasted snippet is worth replacing with a fresh one. And if you ever change your primary domain, Wix deletes your code snippets, so re-add the chat afterwards.

Where ZChat fits. ZChat installs exactly this way: one script snippet from Settings, Chat widget, Embed code, pasted into Wix Custom Code at Body - end, with an Allowed domains list so only your site loads it. The AI answers from your website crawl, uploaded files, help articles and Q&A pairs, says when it does not know, and hands the conversation to your team in the same thread. There is a free plan with one site and 500 AI messages a month, so you can run the tests above on live traffic before paying anything.

Where it doesn't. ZChat does not read Wix Stores or Wix Bookings data, and there is no Wix App Market app; it is a snippet install. If you want order lookups or booking management inside Wix itself, Wix's own apps are the more natural choice, and it is worth trying Wix Smart Chat before any third-party tool.

Wix custom code lives at Settings, then Custom Code under Development & integrations, and needs a published site with a connected domain.

Load the chat on all pages or the handful that generate questions, at Body - end, and set its consent code type deliberately.

Custom code only runs on the published site, so test on your live domain and on a real phone.