> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vectorshift.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Embed on a website

> Add a collapsible chat widget to any website using a script tag or iFrame

Embedding your chatbot places a collapsible chat widget directly on your website. Visitors see a launcher button in the corner of the page, click it, and start chatting without leaving your site. VectorShift provides two embed methods: a script tag (preferred) and an iFrame fallback.

## Prerequisites

<Warning>
  Your chatbot must be deployed before the embed code will work. Open the chatbot builder, go to the **Export** tab, and toggle **Deployment Enabled** to on. See [Share via link](/platform/interfaces/chatbots/export-link) for details.
</Warning>

## Two embed methods

In the **Export** tab of the chatbot builder, you will find two code snippets:

### Script tag (preferred)

The script tag creates a collapsible chat widget that floats in the corner of the page. Users can open and close it without it blocking your website content. The snippet includes your chatbot ID and optional width/height attributes.

```html theme={"languages":{}}
<script
  src="https://app.vectorshift.ai/chatbots/deploy.js"
  chatbot-id="{chatbot_id}"
  chatbot-height="600px"
  chatbot-width="400px">
</script>
```

### iFrame fallback

The iFrame method works with any website builder, including platforms like the Wix free plan that restrict external scripts. The iFrame renders the chatbot inline on the page rather than as a floating widget.

```html theme={"languages":{}}
<iframe
  src="https://app.vectorshift.ai/chatbots/deployed/{chatbot_id}"
  width="400px"
  height="600px"
  allow="clipboard-read; clipboard-write; microphone">
</iframe>
```

<Warning>
  The `allow="clipboard-read; clipboard-write; microphone"` attribute is required for clipboard operations and voice input to work inside the iFrame. Do not remove it.
</Warning>

## WordPress

### Step 1. Open your WordPress Admin and create a post (or page)

Navigate to your WordPress dashboard and create a new post or open an existing one where you want the chatbot to appear.

<img src="https://mintcdn.com/vectorshift/YURehCSPjELT1F4f/images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-post.png?fit=max&auto=format&n=YURehCSPjELT1F4f&q=85&s=53bdb2b9d248dc0b0ce2e1fd3e9f2aa6" alt="WordPress Admin create post" width="1778" height="564" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-post.png" />

### Step 2. Add a Custom HTML block

In the block editor, click the **+** button and search for **Custom HTML**. Add the block to your post.

<img src="https://mintcdn.com/vectorshift/YURehCSPjELT1F4f/images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-block.png?fit=max&auto=format&n=YURehCSPjELT1F4f&q=85&s=ecba2fde0c3b56a1d64a302b5df2632d" alt="WordPress Custom HTML block" width="2152" height="628" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-block.png" />

### Step 3. Copy the script embed code from VectorShift

In the chatbot builder's Export tab, copy the first embed snippet (the script tag). This creates a collapsible widget that will not block your website content.

<Warning>
  Some websites do not allow scripts. If the script does not work on your website, copy the iFrame snippet in the second row instead.
</Warning>

<img src="https://mintcdn.com/vectorshift/YURehCSPjELT1F4f/images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-copy.png?fit=max&auto=format&n=YURehCSPjELT1F4f&q=85&s=0f9ad8fedb95d91d9781128c1359dc04" alt="Copy the embed snippet" width="1644" height="622" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-copy.png" />

### Step 4. Paste the code into the Custom HTML block

<img src="https://mintcdn.com/vectorshift/YURehCSPjELT1F4f/images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-paste.png?fit=max&auto=format&n=YURehCSPjELT1F4f&q=85&s=1acba821cd9ec44d585f4473566b54cc" alt="Paste snippet into WordPress" width="1382" height="704" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-paste.png" />

### Step 5. Publish and test

Publish the post and view it in your browser. You should see the chatbot launcher in the corner of the page.

<img src="https://mintcdn.com/vectorshift/YURehCSPjELT1F4f/images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-demo.png?fit=max&auto=format&n=YURehCSPjELT1F4f&q=85&s=904e494d1869c8e360bdacf5ae824cce" alt="WordPress chatbot demo" width="3106" height="1832" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-demo.png" />

### Step 6. Embed in the site footer (optional)

To make the chatbot available on every page of your website, paste the script tag into your theme's footer widget or footer HTML section instead of a single post.

<img src="https://mintcdn.com/vectorshift/YURehCSPjELT1F4f/images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-footer.png?fit=max&auto=format&n=YURehCSPjELT1F4f&q=85&s=9770cfb566f75f04b5e21de4fc1934a0" alt="WordPress footer embed" width="3456" height="1296" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-wordpress-footer.png" />

## Wix

### Step 1. Open the Wix Editor

Log into your Wix account and click **Edit Site** to open the drag-and-drop editor.

<img src="https://mintcdn.com/vectorshift/PSG1OGMwi51Mi0EL/images/platform/interfaces/chatbots/export-script/chatbots-share-wix-admin.png?fit=max&auto=format&n=PSG1OGMwi51Mi0EL&q=85&s=c3b359a5a21ff2280f36b76027d9abcf" alt="Wix Editor" width="3102" height="1300" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-wix-admin.png" />

### Step 2. Add an Embed HTML element

Click **Add** in the left panel, then search for and add an **Embed HTML** element to your page.

<img src="https://mintcdn.com/vectorshift/YURehCSPjELT1F4f/images/platform/interfaces/chatbots/export-script/chatbots-share-wix-embed.png?fit=max&auto=format&n=YURehCSPjELT1F4f&q=85&s=15eea59decb3ca95cd5a29655b544e32" alt="Wix Embed HTML element" width="1670" height="1252" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-wix-embed.png" />

### Step 3. Copy the iFrame embed code

For Wix, use the **iFrame** snippet (the second option in the Export tab). The Wix free plan does not support external script tags, so the iFrame method is the most reliable choice.

<img src="https://mintcdn.com/vectorshift/YURehCSPjELT1F4f/images/platform/interfaces/chatbots/export-script/chatbots-share-wix-copy.png?fit=max&auto=format&n=YURehCSPjELT1F4f&q=85&s=c86dbbb695da6fcb786cb2215c47411d" alt="Copy iFrame snippet for Wix" width="1644" height="622" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-wix-copy.png" />

### Step 4. Paste and resize

Paste the iFrame code into the Embed HTML element. Drag the element's handles to make the chatbot fully visible on the page.

<img src="https://mintcdn.com/vectorshift/YURehCSPjELT1F4f/images/platform/interfaces/chatbots/export-script/chatbots-share-wix-paste.png?fit=max&auto=format&n=YURehCSPjELT1F4f&q=85&s=a8bfc0bc16cc89ac1655c4b334306793" alt="Paste into Wix Embed element" width="2316" height="1306" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-wix-paste.png" />

### Step 5. Publish and test

Click **Publish** and open your live site. The chatbot should appear inline where you placed the embed element.

<img src="https://mintcdn.com/vectorshift/YURehCSPjELT1F4f/images/platform/interfaces/chatbots/export-script/chatbots-share-wix-demo.png?fit=max&auto=format&n=YURehCSPjELT1F4f&q=85&s=a67b3120167d8e30ca3990a32aad1f29" alt="Wix chatbot demo" width="3454" height="1724" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-wix-demo.png" />

## Bubble.io

### Step 1. Open the Bubble.io editor

Log into your Bubble.io account and open the app you want to add the chatbot to.

### Step 2. Add an HTML element in the UI Builder

In the Bubble.io UI Builder, drag an **HTML** element onto your page.

<img src="https://mintcdn.com/vectorshift/PSG1OGMwi51Mi0EL/images/platform/interfaces/chatbots/export-script/chatbots-share-bubble-element.png?fit=max&auto=format&n=PSG1OGMwi51Mi0EL&q=85&s=ceec0dca33b88faa569b2fb6ef6f09c3" alt="Bubble.io HTML element" width="806" height="408" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-bubble-element.png" />

### Step 3. Copy the script embed code

Copy the first embed snippet (the script tag) from the Export tab in VectorShift. Bubble.io supports script tags, so this creates a collapsible widget.

<Warning>
  Some websites do not allow scripts. If the script does not work on your website, use the iFrame snippet instead.
</Warning>

<img src="https://mintcdn.com/vectorshift/PSG1OGMwi51Mi0EL/images/platform/interfaces/chatbots/export-script/chatbots-share-bubble-copy.png?fit=max&auto=format&n=PSG1OGMwi51Mi0EL&q=85&s=28e0ec85755b12ebec2f4d1b96c6dd31" alt="Copy script snippet for Bubble.io" width="1636" height="624" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-bubble-copy.png" />

### Step 4. Paste the code and enable "Display as an iFrame"

Paste the snippet into the HTML element. Check the **Display as an iFrame** option in the element settings.

<img src="https://mintcdn.com/vectorshift/PSG1OGMwi51Mi0EL/images/platform/interfaces/chatbots/export-script/chatbots-share-bubble-paste.png?fit=max&auto=format&n=PSG1OGMwi51Mi0EL&q=85&s=0cca90f24416df875175cd6dccbe3704" alt="Paste into Bubble.io HTML element" width="2416" height="1750" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-bubble-paste.png" />

### Step 5. Configure the layout

In the **Layout** tab of the element settings, set the minimum height to `610px` to ensure the chatbot is fully visible.

<img src="https://mintcdn.com/vectorshift/PSG1OGMwi51Mi0EL/images/platform/interfaces/chatbots/export-script/chatbots-share-bubble-layout.png?fit=max&auto=format&n=PSG1OGMwi51Mi0EL&q=85&s=3c31c6b200fe11f36c5481ec31626325" alt="Bubble.io layout settings" width="2416" height="1582" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-bubble-layout.png" />

### Step 6. Publish and test

Click **Preview** or **Deploy** to see the chatbot running on your Bubble.io app.

<img src="https://mintcdn.com/vectorshift/PSG1OGMwi51Mi0EL/images/platform/interfaces/chatbots/export-script/chatbots-share-bubble-demo.png?fit=max&auto=format&n=PSG1OGMwi51Mi0EL&q=85&s=9866c2347f4692d998143af0e21599ea" alt="Bubble.io chatbot demo" width="3456" height="1914" data-path="images/platform/interfaces/chatbots/export-script/chatbots-share-bubble-demo.png" />

## Troubleshooting

* **The widget does not appear.** Make sure the chatbot is deployed (Deployment Enabled is on). Check your browser's developer console for script errors.
* **The chatbot loads but voice input does not work in the iFrame.** Verify that the `allow="clipboard-read; clipboard-write; microphone"` attribute is present on the `<iframe>` tag.
* **The script tag does not load on Wix.** Wix's free plan blocks external scripts. Switch to the iFrame method.

## Next steps

<CardGroup cols={2}>
  <Card title="Deploy to Slack" icon="slack" href="/platform/interfaces/chatbots/export-slack">
    Let your team chat with the bot directly in Slack
  </Card>

  <Card title="Deploy via WhatsApp and SMS" icon="phone" href="/platform/interfaces/chatbots/export-whatsapp">
    Connect to WhatsApp or SMS through Twilio
  </Card>
</CardGroup>
