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

# Website widget

> Add your agent's chat to the firm's website with one line of code

The widget shows a floating button on your site that opens a chat with the
firm's agent. Visitors type, the agent replies in real time, and the
conversation lands in your **Conversations** inbox like any other channel.

## 1. Get your key

In the platform, go to **Settings → Integrations → Channels** and add a
channel of type **Widget (API)**. This generates a publishable key with the
format `pk_live_…`. The key identifies your firm: it is designed to be visible
in your page's source.

## 2. Add the script

Paste this line before the closing `</body>` tag on your site:

```html theme={null}
<script
  src="https://widget.juryo.ai/embed.js"
  data-key="pk_live_YOUR_KEY"
  defer
></script>
```

That's it — the chat button appears in the bottom-right corner.

## Customization

Every attribute is optional except `data-key`:

| Attribute          | Description                                                                      | Default               |
| ------------------ | -------------------------------------------------------------------------------- | --------------------- |
| `data-key`         | The channel's publishable key (required)                                         | —                     |
| `data-name`        | Firm name, shown in the chat header                                              | —                     |
| `data-title`       | Accessible title for the panel                                                   | `data-name` or "Chat" |
| `data-color`       | The widget's primary color, in hex                                               | `#053531`             |
| `data-privacy-url` | The firm's privacy policy, linked in the welcome disclaimer (must be `https://`) | —                     |
| `data-position`    | Side of the screen: `right` or `left`                                            | `right`               |

Full example:

```html theme={null}
<script
  src="https://widget.juryo.ai/embed.js"
  data-key="pk_live_YOUR_KEY"
  data-name="García Law"
  data-color="#1a4d47"
  data-privacy-url="https://garcialaw.es/privacy"
  defer
></script>
```

## Behavior

* The chat only loads when a visitor first opens it — the script adds no
  weight to your page load.
* The `Escape` key closes the panel.
* On screens narrower than 480px the chat goes full-screen.
* If the script is accidentally included twice, it initializes only once.
* Visitors are anonymous until they identify themselves during the
  conversation.
