# Add an AI agent to your Wix site > Add your QwryAI agent to every page of a Wix site with the Website widget code and Wix's Custom code settings You can add your QwryAI agent to a Wix site by adding the **Website widget** code to your site's **Custom code** settings in Wix. Once the published site loads the code, a floating chat bubble appears in the bottom corner of every page and opens the chat when a visitor selects it. The chat bubble is included on every QwryAI plan. > [card] What you can do | /docs/user-guides/chatbot/channels | Answer every visitor to your Wix site from a chat bubble, without them leaving the page. ## Before you start * A QwryAI account with an AI agent. If you haven't built one yet, follow [Build your first AI agent](/docs/user-guides/quick-start/your-first-agent). * A Wix site you can edit. Custom code works on Wix's free plan, but Wix only adds it to a site that has been published. ## How to embed your AI agent **1. Open your agent's Chat bubble** In QwryAI, open the agent you want on your site, select **Channels** in the sidebar, then select **Manage** on the **Chat bubble** card. ![The Channels page with the Chat bubble, Help page and Center Stage cards, each with a Manage button, and the pointer on the Chat bubble card's Manage button.](annotated/01-channels.webp "Channels › Chat bubble › Manage.") **2. Open Deploy and choose Website widget** Select **Deploy** in the top-right corner of the Chat bubble editor, then select **Website widget**. ![The Deploy menu open under DEPLOY ON, listing Website widget, Website iframe, Shopify and WordPress, each with a one-line description.](annotated/02-deploy-menu.webp "Deploy lists every way to add your agent.") ![The Deploy menu with the pointer on Website widget (Embed a floating chat bubble on any website).](annotated/03-website-widget.webp "Website widget opens the Website bubble sheet.") **3. Copy the code** On the **Website bubble** sheet, select **Copy** under **Widget setup**. The code already points to your agent, so paste it exactly as copied. ![The Website bubble sheet with Send instructions via email, Copy prompt, the Specific domains toggle, and the Widget setup embed code with the pointer on Copy.](annotated/04-embed-code.webp "Copy the code under Widget setup.") **4. Publish your Wix site** If you haven't published your site yet, open it in the Wix editor and select **Publish**. Wix adds custom code only to published sites. **5. Open Custom code** * In your site's Wix dashboard, select **Settings** in the sidebar. * Scroll to **Development & integrations** and select **Custom code**. * Select **+ Add Custom Code** in the top right. ![The Wix dashboard Settings page with Custom code under Development & integrations.](builder/wix-settings.webp "Custom code is under Development & integrations.") **6. Paste the code and apply it** * Paste your QwryAI code into **Paste the code snippet here**. * Under **Name**, give it a name you'll recognize, such as `QwryAI chat bubble`. * Under **Add Code to Pages**, choose **All pages** and keep **Load code once**. To show the agent on some pages only, choose **Choose specific pages** instead. * Under **Place Code in**, choose **Head**. The code waits until the page has loaded before it adds the chat bubble, so **Body - end** works just as well. * Select **Apply**. ![The Wix Add Custom Code dialog with the QwryAI code pasted (its key shown as YOUR_EMBED_KEY), the name QwryAI chat bubble, All pages with Load code once, Place Code in Head, and the Apply button.](builder/wix-custom-code.webp "All pages, load once, in the Head.") > [!TIP] > > Open your published site and check that the chat bubble appears in the bottom corner. Wix runs custom code only on the live site, not in the editor or its preview. ![A published Wix site with the QwryAI chat bubble and its Hello! How can I help you today? message in the bottom-right corner.](builder/wix-live.webp "The chat bubble on a published Wix site.") ## Allow your Wix address If you turned on **Specific domains** in the **Deploy** sheet, list every address your Wix site runs on, one per line, then select **Save domains**. For example (example values): ```text https://www.acme.com https://jane.wixsite.com ``` ![The Specific domains toggle switched on with https://www.acme.com and https://jane.wixsite.com entered in the domain list, Enter each domain in a new line below it, and the pointer on Save domains.](annotated/06-specific-domains.webp "List each address, one per line, then Save domains.") Enter each address without a path: `https://jane.wixsite.com` covers every site under that address. Each entry matches one exact host, and an entry without `https://` or `http://` is saved as `https://`. Don't use `https://*.wixsite.com`: it would let every Wix site embed your agent. See [Channels](/docs/user-guides/chatbot/channels). ## Troubleshooting > [accordion] The chat bubble doesn't appear on my published site > > **Possible causes:** > > * **Specific domains** is on and the address you're visiting isn't listed. Your browser's developer console shows that the chat was blocked by the page's frame-ancestors policy. > * The visitor's country is in **Blocked countries** under [Guardrails › Country blocking](/docs/user-guides/chatbot/guardrails). > * **Visibility** is off on the Chat bubble's **Overview** tab. > * The code was added with an embed element on the page instead of through **Custom code**. Wix runs that element in its own frame, so the bubble is clipped to the element's box. > > **Solution:** fix the matching setting, publish again, and reload the live site in a private window. > [accordion] The chat bubble doesn't show in the Wix editor > > That's expected. Wix runs custom code only on the published site, not in the editor or its preview. Open the live site to check. > [accordion] The chat bubble shows on desktop but not on my phone > > QwryAI doesn't hide the chat bubble on phones. Check that the custom code loads on the page you're viewing (**All pages**, or that page under **Choose specific pages**), and check the causes above. > [!NOTE] > > You change how the chat looks in QwryAI, not in Wix. Open **Channels**, select **Manage** on the **Chat bubble** card, then open the **Display** tab to edit **Content**, **Style**, **Floating bubble**, **Localization**, **Capabilities** and **Typography**. Select **Publish** to send your changes live; your site picks them up without new code. ## Frequently asked questions > [accordion] Which Custom code options should I pick in Wix? > > **All pages**, **Load code once**, and **Head** or **Body - end**. The code waits for the page to finish loading either way. > [accordion] Can I put the agent on only one Wix page? > > Yes. Under **Add Code to Pages**, choose **Choose specific pages** and pick the pages where the chat bubble should appear. > [accordion] Why does the chat fill the whole screen on my phone? > > That's by design. On screens narrower than 768px, the chat opens full screen until the visitor closes it. > [accordion] Can I move the chat bubble to the left side? > > Yes. Set **Position** to **Left** under **Display › Floating bubble**. Left or right is the only position choice. > > ![The Chat bubble editor on the Display tab with the Floating bubble section open, showing Position with Left and Right options.](annotated/07-floating-bubble.webp "Position: Left or Right.") ## Next steps > [card] Customize the chat bubble | /docs/user-guides/chatbot/channels | Match the chat bubble to your brand's colors, position and wording.