Skip to main content

Integrate BotStacks with Wix

This guide will walk you through adding the BotStacks assistant widget to your Wix website using the custom code feature.

Prerequisite: Adding custom code in Wix requires a Wix Premium plan. This feature is not available on free sites.

1. Copy your BotStacks widget code

Go to the Activate tab in your BotStacks dashboard. You’ll see the code snippets you need to add to your website.

Activate tab with widget code

You’ll need two pieces of code:

  • A <meta> tag for the <head> section
  • Two <script> tags for just before the closing </body> tag

Meta tag (for <head>):

<meta charset="UTF-8">

Script tags (for end of <body>):

Note: Be sure to copy your own apiKey and botId from the Activate tab in your BotStacks dashboard. Do not use the example values below.

<script type="text/javascript" src="https://botstacks.sfo3.cdn.digitaloceanspaces.com/webassistant.js"></script>
<script type="text/javascript">
window.onload = function() {
initBotStackAssistant({
apiKey: "YOUR_API_KEY_HERE",
botId: "YOUR_BOT_ID_HERE"
});
};
</script>

2. Open your Wix site editor

  1. Log in to your Wix account and open the site you want to edit.
  2. Go to the Settings panel.
  3. In the left sidebar, click Settings > Custom Code.
Wix settings

3. Add the meta and script tags in Wix

  1. Click Add Custom Code.
  2. When prompted, paste the <meta charset="UTF-8"> tag and set the location to Head. (Optional: Name it "BotStacks Meta Tag")
  3. Click Add Custom Code again.
  4. Paste both <script> tags (from above) and set the location to Body - end. (Optional: Name it "BotStacks Widget")
  5. Click Apply or Save after each addition.
Wix custom code modal highlighting both head and body-end

4. Publish your site

  1. Click Publish in the Wix editor to make your changes live.
  2. Visit your site and confirm the BotStacks widget appears.

Need help? Contact support or visit our Discord for assistance.