Lunachat
All integrations

Add live chat to your Wix site

Wix's custom code panel exists for exactly this: add the snippet once and it runs on every page of your site.

Setup

  1. Step 1: Check your plan first

    Wix reserves custom code for paid plans and wants the site published with a domain connected. On a free wixsite.com address the Custom Code menu never appears at all. Finding that out now beats preparing the snippet and hunting for somewhere to paste it.

  2. Step 2: Copy your embed code

    In the Lunachat panel, open Websites, pick your site and copy the embed snippet. The public key inside it belongs to that one site.

    HTML
    <script>
      window.lunachat = window.lunachat || function () {
        (lunachat.q = lunachat.q || []).push(arguments);
      };
      lunachat('init', 'pk_live_YOUR_KEY');
    </script>
    <script async src="https://cdn.lunachat.co/w.js"></script>
  3. Step 3: Open the custom code panel

    In your Wix dashboard pick Settings from the left menu, scroll down to Custom Code, and click + Add Custom Code at the top right.

  4. Step 4: Paste the code and set the scope

    Paste the snippet into the box. Set Add Code to Pages to All pages and Place Code in to Head. Leave it loading on every page rather than choosing Load code once; Wix handles page transitions internally, so the box can otherwise vanish after the first page.

  5. Step 5: Pick a category

    Wix files every custom code snippet under a cookie category: Essential, Functional, Analytic or Marketing. Under anything but Essential the code does NOT run until a visitor accepts in the cookie banner, which means the chat box never opens. It is a judgement call, so make it knowing the consequence.

  6. Step 6: Publish the site

    Custom code only runs on a published Wix site. Hit Publish, open your site in a new tab and look for the bubble in the bottom right.

Worth knowing

  • The widget does not appear in the editor preview. Always check on the published address, never the wixsite.com preview.
  • If Wix's own chat tool (Wix Chat) is switched on, your site shows two chat boxes. Visitors can't tell which one reaches you, and whatever they send to the other one never lands in your inbox. Turn one off.
  • Menu names are the same in Wix Studio and the classic Wix Editor; both go through Settings in the dashboard.
  • To show the box only on certain pages, pick them under Add Code to Pages. No code required.
  • The widget is under 40 KB gzipped and loads async, with no measurable effect on your Wix speed score.

Two things to check after setup

Wix sites have two behaviours of their own, and both intersect with the chat box. Looking at them right after setup closes off two questions that would otherwise surface later.

The cookie banner can suppress the box entirely

File the code under Functional, Analytic or Marketing and it will not load until a visitor consents. Someone arriving for the first time and browsing without dismissing the banner never sees your support box at all. Essential loads before consent, but claiming it requires judging the box to be genuinely necessary; make that call alongside your privacy policy.

With Wix Stores, cart data doesn't come through on its own

On Shopify and WooCommerce you can pass the cart total to an agent in a few lines. On Wix that route runs through Velo (Dev Mode), which for most Wix users costs more effort than it returns. Without Velo an agent still sees which product page the visitor is on, where they came from, their city and their device, and in practice that is usually enough to answer the question being asked.

Frequently asked