> 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ebbot.ai/ebbot-docs/developer-resources/ebbot-chat/implement-chat-widget.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
