> For the complete documentation index, see [llms.txt](https://docs.ebbot.ai/ebbot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ebbot.ai/ebbot-docs/developer-resources/ebbot-chat/implement-chat-widget.md).

# Implement Chat Widget

## Implement the Chat widget script on your website

To implement the Ebbot Chat widget on your website, copy the JavaScript snippet directly from the Ebbot Chat platform. Navigate to Chat Widget > Settings in the sidebar menu to find the snippet. ​The snippet includes a unique identifier for your specific widget. If you manage multiple chat agents or chatbots, ensure you have selected the correct one from the dropdown menu in the upper-left corner of the platform before copying the script.

```
<script>
    window.Ebbot = {
      botId: '',
      ovh: true
    };
</script>
<script>!function(t){var e="init-js-widget";if(!t.getElementById(e)){var i=t.createElement("script");i.id=e,i.src="https://storage.gra.cloud.ovh.net/v1/AUTH_fc1ba5ae6eb64e10a8c0b2499d0e8ca9/production/ebbot-web/init.js?t="+Math.random(),t.querySelector("body").appendChild(i)}}(document);</script>
```

## Implement embedded layout variants of the Chat widget

By default, the Ebbot Chat widget appears as a floating bubble. You can change this behavior to render the chat as a static element within your website's layout, such as a Hero section, by modifying the initialization script.

**1. Update the Configuration Script**

Add the `variant` property to your `window.Ebbot` object. Assign it the value `'hero'` or `'embedded'` depending on your design needs.

JavaScript

```javascript
window.Ebbot = {
  botId: 'YOUR_BOT_ID',
  ovh: true, 
  variant: 'hero' // Use 'hero' or 'embedded'
}
```

**2. Create the Target Container**

Place an HTML element with the ID `ebbot-chat-root` at the specific location in your site's structure where the chat should appear.

HTML

```html
<div id="ebbot-chat-root"></div>
```

Note: When a `variant` is specified, the standard floating widget is disabled. The chat interface will only render inside the defined `#ebbot-chat-root` container on that page.
