HomeBlog & GuidesHow to Add Chatbot to Wix
Wix Implementation Tutorial

How to Add an AI Chatbot to Wix (Custom Code & Iframe Guide)

Step-by-step engineering tutorial on embedding an autonomous AI support assistant into your Wix website. Learn how to use Wix Custom Code settings, overcome iframe sandboxing for inline containers, and crawl your Wix XML sitemap for instant source grounding.

5 min technical read
Requires Wix Premium & Custom Domain
Verified engineering guide
Wix Architecture Overview

Wix offers two distinct methods for adding custom code: Custom Code in Site Settings (recommended for site-wide floating widgets) and HTML Embed Elements inside Wix Editor (used for in-page container embeds). Because Wix executes in-editor code within cross-origin sandboxed iframes, understanding proper code placement ensures your chatbot launches cleanly without mobile rendering glitches.

Method A (Recommended)Wix Settings > Custom Code (Body - End)
Method B (In-Page)HTML Embed Element (Direct Widget Iframe)
01

Index Your Wix Website & Document Sources

Before embedding the widget, populate your Knogents knowledge base with your Wix website content:

Step A: Submit Wix XML Sitemap

Every published Wix website automatically generates an XML sitemap at https://yourdomain.com/sitemap.xml. In Knogents, navigate to Knowledge Base > Add Source > Website Crawl, paste your sitemap URL, and click Index Pages. Knogents crawls your static pages, Wix blog posts, and service listings.

Step B: Upload Complex Catalogs or Manuals

If you offer complex pricing tiers, technical service specifications, or product matrices, upload an Excel (.xlsx) or PDF document. Knogents proprietary markdown parser preserves column and row headers across chunk boundaries so answers remain strictly factual.

02

Method A: Site-Wide Floating Chatbot (Recommended)

This method displays a floating launcher bubble in the bottom right corner of all pages across your Wix site:

  1. Log in to your Wix Dashboard and select your site.
  2. In the left sidebar, click Settings, then scroll down to the Advanced section and click Custom Code.
  3. Click + Add Custom Code in the top right corner.
  4. Paste your Knogents asynchronous script snippet into the code box:
<!-- Knogents AI Assistant for Wix -->
<script
  src="https://knogents.com/embed.js"
  data-agent-id="YOUR_AGENT_PUBLIC_ID"
  data-theme="teal"
  async
></script>
  1. Under Name, enter "Knogents AI Chatbot".
  2. Under Add Code to Pages, select All Pages and choose Load code once.
  3. Under Place Code in, select Body - end (this guarantees optimal Core Web Vitals and prevents render blocking).
  4. Click Apply.
03

Method B: In-Page Portal Embed (Wix Editor HTML Block)

If you want the chat assistant embedded directly inside your page layout (e.g., inside a dedicated /contact or /support page):

  1. Open your site in the Wix Editor.
  2. In the left toolbar, click + Add Elements > Embed Code > Embed HTML.
  3. Drag the HTML block into your section and resize its container (recommended: at least 420px width and 580px height).
  4. Click Enter Code and paste your direct widget iframe snippet:
<iframe
  src="https://knogents.com/widget?agentId=YOUR_AGENT_PUBLIC_ID"
  style="width: 100%; height: 100%; border: none; border-radius: 12px;"
  allow="clipboard-write"
></iframe>
  1. Click Update and publish your site.
Honest Technical Limitations for Wix Users
  • •Wix Premium Plan Requirement: Wix blocks custom code injection on free starter plans. You must be subscribed to a paid Wix plan (Light, Core, Business, or Business Elite) with a custom domain connected.
  • •Wix Sandboxed Iframes: When using the in-editor HTML element (Method B), Wix isolates the block within a sandboxed iframe. If the container dimensions are set too small in the Wix Editor, the chat window will appear clipped.
  • •No Native Wix Owner App Integration: Knogents is an autonomous resolution engine. We do not inject a live human operator chat console into the Wix Owner mobile app. Human handoff occurs via lead capture and instant email alerts.

Frequently Asked Questions

Will Knogents affect my Wix site performance or SEO?

No. The script is lightweight (under 18KB) and loads asynchronously at the end of the body tag, meaning it will not delay DOM rendering or reduce Google Lighthouse scores.

Can I schedule automatic re-syncs when my Wix site changes?

Yes. On Knogents Basic ($29/mo), your Wix sitemap is automatically re-indexed weekly; on Standard ($59/mo), re-indexing runs daily. You can also trigger an immediate manual re-sync anytime.

Add Your Autonomous AI Chatbot to Wix Today

Index your Wix sitemap, customize colors, and paste into Custom Code in under 4 minutes. Free plan includes 100 messages/month with zero credit card required.

Recommended Business Solutions

Discover autonomous AI solutions powered by these installation techniques.

Related Guides & Tutorials

Continue exploring practical guides to embedding and training your chatbot.

24/7 STOREFRONT ASSISTANT

Ready to Build Your AI Agent?

Train an AI chatbot on your website URLs, PDFs, and spreadsheets in 2 minutes with verified factual accuracy.

Free tier includes 100 messages/mo
No credit card required
Under 20 KB vanilla script