Skip to main content

Add the website widget to Wix

Before you start​

  • You need access to your Wix site's dashboard.
  • Your site must be on a paid Wix plan, published, and connected to a custom domain. Free Wix sites do not support custom code.

Steps​

  1. Log in to Wix and open your site's dashboard.

  2. Go to Settings, then under the Advanced section choose Custom code.

  3. Click + Add Custom Code at the top right.

  4. Paste the code below into the code box:

    <!-- Chat -->
    <script
    id="xapp-js"
    src="https://widget.xapp.ai/xapp-chat-widget.js?key=YOUR_CHAT_KEY"
    ></script>
    <!-- Form / Scheduler -->
    <script
    id="xapp-form-js"
    src="https://form.xapp.ai/xapp-form-widget.js?key=YOUR_FORM_KEY"
    ></script>

    Note! Please replace "YOUR_CHAT_KEY" with your actual widget key.

  5. Set up the code:

    • Give it a name, for example "Website widget".
    • Under "Add Code to Pages", choose All pages and Load code once.
    • Under "Place Code in", choose Body - end.
  6. Click Apply, then publish your site so the change goes live.

Check it worked​

Visit your live site (not the editor preview). The widget button should appear on the page. It can take a few minutes to show up; if you don't see it, clear your browser cache or open the site in a private window.

Troubleshooting​

  • Widget not appearing: check that the custom code was saved, is set to All pages and Body - end, and that you published the site.
  • No Custom code option: custom code needs a paid plan with a connected domain.
  • Still nothing: open your browser's developer console and look for script errors on the page.

Help AI assistants find your business on Wix​

AI assistants such as ChatGPT, Claude and Gemini can ask your business questions and send you leads directly, through a connection made for AI agents. When the website widget loads, it adds tags to your page that tell assistants where that connection is. Some assistants read a page without running its scripts, so they never see those tags. Adding the same tags to your site's page header reaches them too. Having the tags in both places does no harm: when the page already has them, the widget leaves them as they are.

Before you start​

  • You need access to your Wix site's dashboard.
  • Your site must be on a paid Wix plan, published, and connected to a custom domain. Free Wix sites do not support custom code.

Steps​

  1. Log in to Wix and open your site's dashboard.

  2. Go to Settings, then under the Advanced section choose Custom code.

  3. Click + Add Custom Code at the top right.

  4. Paste the code below into the code box:

    <link rel="mcp-server" href="https://agentic.xapp.ai/YOUR_APP_ID/mcp">
    <link rel="mcp-manifest" href="https://agentic.xapp.ai/YOUR_APP_ID/.well-known/mcp/manifest.json">
    <link rel="mcp-server-card" href="https://agentic.xapp.ai/YOUR_APP_ID/mcp/server-card">

    Note! Please replace "YOUR_APP_ID" with your actual app ID.

  5. Set up the code:

    • Give it a name, for example "AI assistant tags".
    • Under "Add Code to Pages", choose All pages and Load code once.
    • Under "Place Code in", choose Head.
  6. Click Apply, then publish your site so the change goes live.

Check it worked​

  1. Open your website in a browser.
  2. View the page source (Ctrl+U on Windows, Option+Cmd+U on a Mac).
  3. Search for mcp-server. You should find it near the top of the page, in the header.

Troubleshooting​

  • The tags don't appear: make sure you published or saved the change, then clear your browser cache and reload.
  • The tags are in the page body, not the header: move them into the header setting, not a section or block on the page.

Your keys​

Replace YOUR_CHAT_KEY and YOUR_FORM_KEY with your own keys, or copy the finished snippets from Studio instead. Keep only the snippets for the widgets you use.

To add Intelligent Search as well, paste this snippet in the same place:

<script
id="xapp-search-js"
src="https://search.xapp.ai/xapp-search-bar.js?key=YOUR_SEARCH_KEY"
></script>

Note! Please replace "YOUR_SEARCH_KEY" with your actual widget key.

The search bar also needs a button on your site to open it. See Triggering search with a button press and How to find the Intelligent Search key.

References​