Integration Guide

    Widget Deployment for Wix

    This guide is for Wix sites on a Core plan or higher, using the standard Wix Editor, with an active LastBot ONE account and a configured bot. Custom Code in Wix requires a paid site plan, it is not available on the free plan.

    Before you begin

    • An active LastBot ONE account with a published bot
    • A Wix website on Core plan or higher
    • Admin access to your Wix dashboard with permission to edit Custom Code

    How the widget works on Wix

    • LastBot widgets are added through the Custom Code feature under Settings. This is the only supported method.
    • Popup widget: a floating chat bubble visitors click to open. Added via Custom Code so it appears on all pages or on selected pages only.
    • Embedded widget: always visible inside a specific page. Because of how Wix injects custom code, the widget always renders at the bottom of the page.
    • Do not use the Wix Embed HTML block from the editor. It places the widget inside an iframe on a different domain and causes an Unauthorized domain error.

    Part 1: Popup widget

    The popup widget appears as a floating chat button in the corner of your page. Visitors click it to open and close the chat.

    1

    Get your embed code from LastBot Hub

    • Log in to your LastBot Hub and open your bot.
    • Click the Publish button in the top-right corner.
    • The "Let's go live!" dialog opens.
    • Select Popup widget.
    2

    Configure the widget

    Under Step 1: Configure Widget Settings in the Hub.

    • Auto Open: toggle on if you want the chat to open automatically when a visitor loads the page.
    • Full Screen: toggle on if you want the chat to expand to fill the browser window.
    • The embed code updates automatically as you change these settings.
    3

    Copy the code

    • Under Step 2: Copy and Paste the Generated Code, click Copy.
    4

    Add the code to Wix

    Option A shows the popup on all pages, Option B on selected pages only.

    • Option A: go to your Wix dashboard, click Settings, scroll to Development & integrations and click Custom code.
    • Click the blue + Add Custom Code button, paste your code, and name it, for example LastBot Popup Widget.
    • Under Add Code to Pages select All Pages. Under Place Code in select Body - end. Click Apply.
    • Option B: follow the same steps but under Add Code to Pages select Choose specific pages and tick the pages where the popup should appear.
    Use Option B when you want the popup on most pages but not all, for example when one page uses the embedded widget instead.
    5

    Publish and verify

    • Click Publish in the top-right corner of the Wix editor.
    • Open your live website URL in a private browser window.
    • The chat button should appear in the bottom corner of the page.
    • Click it and send a test message to confirm the bot responds.

    Part 2: Embedded widget

    The embedded widget is placed at the bottom of a specific page. It has no open or close button and is always visible. Use this for dedicated chat or support pages.

    1

    Get your embed code from LastBot Hub

    • Log in to your LastBot Hub and open your bot.
    • Click Publish in the top-right corner.
    • Select Embedded widget in the dialog.
    2

    Configure the widget

    Under Step 1: Configure Widget Settings in the Hub.

    • Maximum height: the maximum height the widget grows to before scrolling internally. Default is 600px.
    • Avatar and welcome message: choose Normal, Small, or Hidden.
    • Hide avatar and welcome message after the first message: tick this to give more space to the conversation once chatting starts.
    3

    Copy both parts of the code

    The embedded widget code has two parts, each with its own Copy button.

    • When the Hub asks which framework you use, select HTML.
    • Click the Copy button at the very top of Step 2 to copy the script tag, and paste it into a text editor.
    • Click the Copy button below the HTML code block and paste it on a new line directly below the script tag.
    • You now have the complete code in the correct order: script tag on top, HTML code block below.
    If either part is missing, the widget will not appear and no error message is shown.
    4

    Add the code to the page in Wix

    • Go to your Wix dashboard, Settings, Custom code, and click + Add Custom Code.
    • Paste the combined code and name it, for example LastBot Embedded Widget.
    • Under Add Code to Pages select Choose specific pages and tick the page where the widget should appear.
    • Under Place Code in select Body - end, then click Apply.
    5

    Control the widget width (optional)

    By default the widget stretches to the full page width. Add this CSS block as the very first thing in the code box, above the script tag.

    • Go to Settings, Custom code, find your LastBot Embedded Widget entry and click Edit.
    • Click at the very beginning of the code box, before the script tag, and add the CSS below.
    • Change 680px to any width that fits your page. Remove auto from the margin if you want the widget left aligned.
    <style>
      div[data-lastbot] {
        max-width: 680px;
        margin: 2rem auto;
      }
    </style>
    6

    Publish and test

    • Click Publish in the top-right corner of the Wix editor.
    • Open the specific page URL in a private browser window.
    • The chat widget should appear at the bottom of the page.
    • Send a test message to confirm the bot responds.
    The widget will not appear while you are in the Wix editor. Always verify on the live published URL.

    Troubleshooting: popup widget

    • Confirm you clicked Publish after adding the Custom Code. The widget does not go live until the site is published.
    • Open the live URL in a private browser window to avoid cached versions.
    • Verify your Wix plan supports Custom Code. Core plan or higher is required.
    • Confirm Add Code to Pages includes the page you are testing.
    • Confirm Place Code in is set to Body - end.
    • Temporarily disable ad blockers or privacy extensions and reload. Some blockers prevent chat widgets from loading.

    Troubleshooting: embedded widget

    • Confirm you clicked Publish after applying the Custom Code.
    • Open the live URL in a private browser window. The widget does not appear in the Wix editor or preview mode.
    • Confirm you selected HTML as the framework in the Hub. React or Other generates code that will not work in Wix.
    • Confirm the code box contains both parts in the correct order: script tag first, HTML code block directly below.
    • Confirm Add Code to Pages is set to the correct specific page and Place Code in is Body - end.
    • If you added the optional width CSS, confirm it is placed above the script tag.
    • Temporarily disable ad blockers or privacy extensions and reload.

    Limitations

    • Free plan users: Custom Code is not available on the Wix free plan. Upgrade to Core or higher.
    • Wix Studio and Editor X: this guide targets the standard Wix Editor, navigation labels may differ elsewhere.
    • Permissions: in agency or multi-user setups you need permission to edit Custom Code.
    • Embedded widget position: it always appears at the bottom of the page. Mid-page placement is not possible in the standard Wix Editor.
    • Always select HTML when copying the embed code from the Hub.
    • The embedded widget code has two parts, both must be pasted in the correct order.
    • The widget only appears on the live published site, not in the editor or preview mode.
    • Some ad blockers and privacy extensions can prevent the widget from loading.

    Need help?

    Contact your LastBot account manager or reach out to our support team.