---
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-12-02
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).

## A form on your website

The form from any of your published pages can sit on your own site the same
way. Paste this where the form should appear (not at the end of the page):

```html
<script async src="https://one.ie/c/form.js" data-page="contact" data-ws="your-slug"></script>
```

| Attribute | What it does |
| --- | --- |
| `data-page` | The slug of a published page that has a form on it. Drafts are never shown. |
| `data-ws` | Your workspace slug. The page is looked up in this workspace. |
| `data-form` | Optional. The id of one form block, when the page has more than one. Without it, the first form is shown. |
| `data-target` | Optional. A CSS selector, such as `#quote`, for an element to put the form in. Without it, the form appears right where the tag is. |

The form grows to its own height, and the thank-you message shows inside it.
Every submit is the same as one made on the page itself: the lead lands in
People, a text-message or WhatsApp tick keeps its fixed words, and the ad
click that brought the visitor to your site (Google, Meta, Microsoft and UTM
tags) is stored with the lead. The allowed-sites list below covers the form too.

## Make yours

[/settings/embed](/settings/embed) is where you copy your snippets (the chat,
and a form from any published page) and manage the allowed sites. It needs you
to sign in.