> For the complete documentation index, see [llms.txt](https://helpdocumentation.gitbook.io/user-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://helpdocumentation.gitbook.io/user-documentation/web-chat-widget/create-and-embed-web-chat-widget-to-your-website.md).

# Create and Embed Web Chat Widget to Your Website

### Step 1: Open Widget Section

1. Log in to the panel.
2. From the left-hand menu, go to **Web Chat**.
3. Open the **Widget** section.
4. Click **Create Widget**.

### Step 2: Enter Widget Details

1. Enter a **Widget Name**.
   * Example: `My Website Chat`
2. Enter the **Website Domain** where you want to use the widget.
3. Make sure the domain is entered correctly.
4. Click **Create Widget**.

### Step 3: Get the Widget Code

1. Once the widget is created successfully, the **Widget Code** will be displayed.
2. Copy the complete widget code.
3. This code is required to display the chat widget on your website.

### Step 4: Add the Widget Code to Your Website

1. Open your website's source code.
2. Paste the copied widget code into the appropriate section of your website.
3. Save the changes.
4. Open or refresh your website to verify that the Web Chat widget is displayed.

{% embed url="<https://www.youtube.com/watch?v=X3Pj3tNZ5Zs&feature=youtu.be>" %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://helpdocumentation.gitbook.io/user-documentation/web-chat-widget/create-and-embed-web-chat-widget-to-your-website.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
