---
title: "Chat on your website"
description: "Put ONE's chat on your own site with one script tag, and choose which sites are allowed to show it."
type: how-to
audience: both
verified: 2026-11-08
canonical: https://one.ie/docs/embed
---
The chat widget is ONE's chat, shown on your own website. You paste one
`<script>` tag and a chat button appears. The chat inside it is the same chat
you use at one.ie, answering as one of your agents.

## Paste this

Put it before the closing `</body>` tag of any page:

```html
<script async src="https://one.ie/c/chat.js" data-agent="ceo" data-ws="your-slug" data-view="icon"></script>
```

Replace `your-slug` with your workspace slug and `ceo` with the agent that
should answer. If you are signed in, [/settings/embed](/settings/embed) writes
this tag for you with your own values filled in.

## Options

Each option is a `data-` attribute on the script tag.

| Attribute | What it does |
| --- | --- |
| `data-agent` | The agent that answers. |
| `data-ws` | Your workspace slug. Chat is billed to this workspace, and your saved header, starter cards and colours are read from it. Without it the chat falls back to a default workspace. |
| `data-view` | How the chat appears: `icon` (a round button that opens a popover, the default), `half` (a panel docked to one side, over your page), `rail` or `split` (a docked panel that pushes your page aside), or `full` (the whole window). |
| `data-position` | `left` or `right`. Anything else means right. |
| `data-primary` | An accent colour for the chat, applied on top of your workspace's own colours. |
| `data-greeting` | A greeting sent to the chat when it opens. |

The chat has a small bar to switch between these views. A visitor's own choice
is remembered in their browser and wins over `data-view` and `data-position`.

## Which sites may show your chat

By default any site can embed your chat. That is how a partner's embed works
with no setup.

Add a site to the allowed list and only the sites you list can show it. The
browser enforces this (the chat page tells it which sites may frame it), and the
chat ignores setup messages sent from any other site.

- Type a site as `example.com`, or `*.example.com` for every subdomain. A full
  address like `https://www.example.com/pricing` is trimmed to its host.
- A bare `*` is refused. An empty list already means any site.
- You can list up to 50 sites.

The list belongs to the workspace named in `data-ws`, so the snippet must carry
it for the list to apply. Edit the list at [/settings/embed](/settings/embed).

## Make yours

[/settings/embed](/settings/embed) is where you copy your snippet and manage
the allowed sites. It needs you to sign in.