How to add a custom AI chatbot to your Wix website
· 6 min read
Wix makes it easy to build a site, and almost as easy to add an AI chat assistant to it. Wix has a setting for exactly this, Custom Code, which adds a snippet to every page without touching your design. Most AI chat assistants, ours included, are added with a single line of code, a script tag, and that's where it goes.
This guide uses Pixexl's assistant as the example, but the steps are the same for most chat tools that give you a script tag.
Before you start
You'll need four things:
- A Premium plan and a connected domain. Wix only offers Custom Code on paid plans, on a site with its own domain.
- Admin access to the site, as its owner or an admin collaborator.
- Your chat's embed code. In Pixexl, it's on your project's Settings tab, under the integration code. It looks something like this:
<script
src="https://…/pixe-widget.js"
data-project-id="your-project-id"
data-api="https://…"
async
></script>
- Your domain added to the project. For security, the chat only runs on domains you've allowed. Your main domain is set when you create the project.
It's also worth giving the assistant something to answer from first: add your site's pages as its knowledge (see What to give your AI assistant so it answers well).
Add the code with Custom Code
- Open your site's dashboard (not the Editor).
- Go to Settings, then find Custom Code. It's in the advanced or Development & integrations part of Settings, depending on your dashboard.
- Choose + Add Custom Code.
- Paste your embed code into the box, and give it a name you'll recognise, like "Pixe chat".
- Under Add Code to Pages, choose All pages, and Load code on each new page.
- Under Place Code in, choose Body - end.
- Choose Apply.
Custom Code goes live straight away; there's nothing to publish. Open your live site in a new tab (not the Editor's preview) and the chat button should appear in the corner.
Wix Chat, a Wix app, or embed code?
Wix has its own chat, and the App Market has chatbot apps. Here's how they differ:
- Wix Chat is a live chat for you to answer visitors yourself, from the Wix app or dashboard. It doesn't answer on its own.
- A chatbot app from the App Market works inside Wix and only on Wix.
- An embed code runs on the provider's service, so the same assistant works if you add a second site or move off Wix later. Its knowledge, forms and conversations live in its own dashboard.
If you add an AI assistant, turn Wix Chat off (in the Editor, remove the Chat button, or turn off Wix Chat in the dashboard's settings) so visitors don't see two chat buttons on top of each other.
Will it clash with my design?
It shouldn't. The chat draws itself in its own sealed-off area of the page, so your site's styles can't change how it looks, and its styles can't leak into your design. Its colours, greeting and position come from the Widget tab in your Pixexl dashboard, so you can change them later without opening Wix.
Cookie consent
The chat remembers a visitor's conversation in their browser, so it's covered by your cookie rules. Either keep the chat's own cookie notice (on by default, linked to your privacy policy from the Widget tab), or, if you use Wix's cookie banner or a consent app, turn the chat's notice off, add data-consent="pending" to the script tag and have your consent tool call PixeWidget.grantConsent() when the visitor agrees. Pick one, not both.
It's not showing up: what to check
- You're in the Editor. Custom code only runs on the published site. Open your live address.
- The Custom Code option is missing. The site needs a Premium plan and a connected domain.
- It's set to some pages only. Edit the snippet in Custom Code and check All pages and Body - end.
- You changed your domain. Wix ties custom code to a domain. If you connected a new one, check the snippet is still there and add it again if not; add the new domain to the project too.
- The chat is switched off. Check that "Show the chat on my site" is on in the Widget tab.
- A typo in the code. Copy the embed code again from the Settings tab rather than retyping it.
If it still won't appear, open your browser's developer console (right-click, Inspect, then Console). The chat leaves a short message there explaining why it didn't load.
After it's live
Ask it the questions your customers ask, read the real conversations once a week, and add forms so a question can turn into a booking or an enquiry without leaving the chat (see How to turn website chats into bookings and enquiries).
Every Pixexl plan includes the assistant, and your first 2 weeks are free, so you can try it on your Wix site with real visitors before you decide. Meet Pixe AI to see what it can do.
Wix chatbot questions
Which Wix plan do I need to add a chatbot?
Wix's Custom Code setting needs a paid (Premium) plan and a connected domain. On a free Wix site there's nowhere to add a script, so a third-party chat can't be added.
Why doesn't the chat show in the Wix Editor?
Custom code doesn't run in the Editor or its preview. Publish the site and open the live address to see the chat.
Can I use this instead of Wix Chat?
Yes. Wix Chat is for talking to visitors yourself; an AI assistant answers on its own, from your pages, at any hour. If you switch, turn Wix Chat off so visitors don't see two chat buttons.
Does it work with Wix Studio?
Yes. Wix Studio sites have the same Custom Code setting in the site's dashboard, under Settings.
Is there a free trial?
Yes. Every Pixexl plan includes the AI chat assistant, and your first 2 weeks are free, so you can try it on your Wix site with real visitors. See pricing for the plans.