Wix guide

How to Add an AI Chatbot to a Wix Site

To add a PrimeWebKit chatbot to Wix, copy the snippet from your bot's Widget tab, add it through Wix's site-wide custom-code feature in the footer, and publish. The current Wix menu path is marked for verification because it is not documented in this project's existing guides.

Last updated: 2026-10-25

Before you start

This guide uses PrimeWebKit's standard website widget: one external script that loads the chatbot configured in your account. It does not install a native Wixplugin or automatically connect your site's private data. The platform-specific steps below explain where the snippet belongs and what to verify before making a live change.

  • A published PrimeWebKit bot and the snippet copied from its Widget tab.
  • A Wix plan and site-editor permissions that support adding custom code; confirm availability in your Wix account.
  • Access to publish the Wix site and to manage any site-wide privacy or consent settings.
  • Your public site domain in the bot's allowed-domains setting, if domain restrictions are enabled.

Installation steps

  1. 1. Locate Wix's site-wide custom-code area

    Editor or file path: {{VERIFY: Wix dashboard → current site settings → Custom Code; confirm the current menu labels and availability in Wix help}}

    Use Wix's official instructions for the current editor and subscription plan. Choose a site-wide placement in the footer or body-end area if Wix offers that position. This project has no verified Wix menu path, so confirm the exact labels and injection behavior before following the next step.

  2. 2. Add the bot's exact script

    Editor or file path: {{VERIFY: Wix Custom Code → select the site's pages and body-end/footer placement}}

    Paste the full snippet from the PrimeWebKit Widget tab, keep the bot ID intact, and set the scope so the widget appears on the intended pages. A site-wide setting is appropriate for a chat bubble that should be available throughout the public site. Do not paste the snippet into a visible text element or a page-specific embed block unless only that page needs the chatbot.

  3. 3. Publish and test the live Wix site

    Editor or file path: Wix editor → Publish (confirm the current control label in your editor)

    Publish the site after reviewing Wix's own preview and then test the public URL. Some site builders do not execute external scripts in editor previews, so the published page is the meaningful test. If the menu or footer injection options differ in your account, pause and check Wix support rather than guessing at a setting.

The menu paths marked {{VERIFY}}are not confirmed by the existing project documentation. Check the platform's current first-party help and your account's available features before applying them.

Widget snippet

Copy the snippet from the selected bot's Widget tab whenever possible. The example below shows the format for your reference; replace the example identifier only with the bot ID from your own copied snippet.

<script src="https://api.primewebkit.com/widget.js" data-bot-id="YOUR_BOT_ID" async></script>

Example format only. Copy your own snippet from the bot's Widget tab, and confirm that Wix permits this external script in the selected code-injection location.

Platform-specific notes

Wix editor features and custom-code availability can vary by site type, plan, region, or editor version. The placeholder paths above are deliberate: verify them against Wix's current first-party documentation or your account before adding code.

Do not use an HTML embed element as a substitute for site-wide script injection without confirming Wix supports the required script execution there. An embed can be sandboxed or confined to a frame and may not behave like a normal floating widget.

Before publishing, review any site-wide consent banner, security policy, and domain restrictions already in place. Add the widget only to the pages and hostnames where it is intended to run, and avoid copying account secrets or private customer data into the page source.

Verify the chatbot is working

Test a published page, not just an editor preview. Confirm the launcher is visible, opens when activated, and accepts a question. Ask something answered by the bot's current knowledge sources, then check that an unrelated or unsupported question is handled within the limits of the bot's instructions.

Repeat the check on another page that shares the layout and on each hostname visitors use, such as a staging host and the production domain. If the bot is restricted to allowed domains, include the exact hostname for each environment before testing. Inspect the browser console and Network panel if the script or API request fails; record the specific error rather than changing unrelated settings.

Common problems

The widget does not appear

Confirm that the page was published with the script, the bot ID is correct, and the exact site hostname is allowed in the bot's domain settings. Check the browser console and Network panel for blocked or failed requests, then clear the site's page cache and test the public page again.

A cache or optimization tool serves an old page

Purge the relevant page, hosting, or CDN cache after publishing. Temporarily compare the public page in a private browser window and inspect its page source for the script before changing other settings. Avoid disabling all optimization or security features as a first step.

A content-security policy blocks the script

A CSP can prevent the browser from loading an external script or connecting to the widget service. Read the exact blocked origin in the browser console, then have the site administrator update only the applicable script-src or connect-src policy after verifying the required host. Do not use a wildcard policy as a workaround.

A builder or plugin changes the injected code

Some page builders, script managers, and cache plugins defer, rewrite, or sanitize custom code. Check the published HTML and console, confirm the tool supports external scripts in the chosen location, and remove duplicate copies before trying another injection point.

Frequently asked questions

Where do I get the Wix chatbot script?

Open the bot you want to publish in PrimeWebKit, go to its Widget tab, and copy the complete snippet shown there. Use that bot-specific script and ID rather than a placeholder or a snippet from another bot.

Can the chatbot appear on every Wix page?

Yes, when the script is added once to a shared site-wide layout or footer that is included on those pages. If you place it in a page-specific block or template, it may only appear on that page. Test more than one public page after publishing.

Do I need a Wix plugin?

This guide uses Wix's site-wide custom-code feature, not a claimed PrimeWebKit Wix plugin. Confirm that your Wix editor and plan support external custom scripts before proceeding.

What should I check if the widget is missing?

Check that the latest page was published, the script and bot ID are present, and the tested hostname is allowed in the bot settings. Then inspect the browser console and Network panel for blocked or failed script requests and clear relevant caches.

Can a content-security policy block the chatbot?

Yes. A restrictive CSP may block the widget script or its network requests. Use the exact blocked origin reported by the browser and ask the site administrator to update the relevant policy narrowly; do not add wildcard permissions.

How do I avoid loading the widget twice?

Place the script in one shared insertion point only. Do not add a second copy in a page block, another theme file, or a script plugin if it is already in the global layout. Check the rendered page source when troubleshooting duplicate launchers.