Wix has a Custom Code setting that adds a piece of code to every page of your site, and that is all the Yaplet widget needs. You copy one block of code from Yaplet, paste it into Wix, and the chat button appears on your site. It works the same way on Wix and Wix Studio sites.
Wix lets you add custom code only to a published site with a connected domain, and connecting a domain needs a Premium or Wix Studio site plan.
1. Copy your Yaplet code
In the Yaplet dashboard's left menu, go to Brand → (your brand) → Chat widget → Install. If the tab asks where your website runs, choose Wix. Copy the code with the copy button on the code block.
Wix's custom code box expects HTML, so the code you paste in step 3 must be inside <script> tags.
2. Open Custom Code in Wix
In your site's dashboard, go to Settings and click Custom Code in the Development & integrations section. Then click + Add Custom Code at the top right.
3. Add the Yaplet code
- Paste the Yaplet code into the text box. The code you paste must start with a
<script>line and end with a</script>line; if what you copied starts with!function (Yapletinstead, type<script>on a new line before it and</script>on a new line after it. - Give the code a name you will recognize later, for example Yaplet chat.
- Under Add Code to Pages, choose All pages. Wix also asks whether to load the code once per visit or on each page. Either works: the Yaplet code never starts the chat twice.
- Under Place Code in, choose Body – end. The Yaplet code loads the chat in the background, so it never slows your pages down.
- Click Apply.
The text box should look like this:
<script>
!function (Yaplet, t, i) { … your Yaplet code … }();
</script>
4. Check your site
Custom code runs only on your published site, not in the Wix editor. Open your site in a new browser tab and reload the page. The Yaplet chat button appears in the bottom-right corner. Click it to check that the chat opens.
For a full checklist, see Verify your installation.
If the chat doesn't appear
- The code shows up as text on your pages. The
<script>tags are missing. Edit the Yaplet code in Custom Code and add them as in step 3. - Wix doesn't let you add custom code. Your site must be published and have a connected domain, which needs a Premium or Wix Studio site plan.
- You changed your site's domain. Wix deletes custom code when you assign a different domain to your site. Add the Yaplet code again.
- The code is switched off. Each code in Custom Code has its own toggle. Make sure the Yaplet one is on.
- Some visitors don't see the chat. Wix marks custom code as Essential by default and loads it for every visitor. If you changed the Yaplet code's Code Type to Marketing, Analytic or Functional, visitors who decline that kind of cookies in your cookie banner may not get the chat.
- You still see the old version of your site. Reload the page without the browser cache, or open it in a private window.
What's next
To see what the code does and where your widget ID is, read Install Yaplet.