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

# Chat on your website

> One script tag, on any site.

The chat widget is a floating button that opens a conversation panel. It runs
on any site, needs no framework, and is kept deliberately small.

## Set it up

<Steps>
  <Step title="Add the channel">
    In the dashboard, go to **Channels** and pick **Chat on your website**.
  </Step>

  <Step title="Answer four questions">
    Your domain, whether to ask for an email address, the opening message, and
    how it should behave on a phone. Any of these can be changed later.
  </Step>

  <Step title="Choose how it looks">
    A colour and a position. The preview reflects a visitor's view as you
    adjust them.
  </Step>

  <Step title="Paste one line into your site">
    Under **Install** you will find your snippet. Put it before the closing
    `</body>` tag.
  </Step>
</Steps>

```html theme={null}
<script async src="https://cdn.minidesk.ai/widget/current/widget.js" data-public-key="pk_live_..."></script>
```

That is the whole installation. The script is `async`, so it will never hold up
your page.

## Your domain

This is the setting people get wrong, so it pays to be precise.

You provide a **domain**, not a page: `yoursite.com`, not
`yoursite.com/contact`.

A subdomain counts as a separate address. If your site lives at
`www.yoursite.com`, enter that. If you run chat on both the marketing site and
the app, list both.

We check the domain on our side against the page the widget actually loaded on.
That is what stops someone from copying your snippet onto their own site and
using your workspace.

<Note>
  Changing the domain later keeps the same widget key, so the snippet already
  on your site keeps working. It stops answering on the old domain the moment
  you save.
</Note>

## The public key is public

`data-public-key` is meant to sit in your page source. It is not a secret and
it cannot read anything. It identifies which placement is asking, and the
domain check is what keeps it safe.

Do not confuse it with an [API credential](/guides/authentication), which
starts with `mdsk_api_` and must never appear in a browser.

## Asking for an email address

You can have the widget ask for an email after the visitor's first message.

The ask happens **in the conversation**, after they have said what they want,
not as a form standing in front of the chat. A visitor who has already typed
their question is far more likely to leave an address than one who has been
asked for one before they could ask anything.

An address given this way is stored **unverified**. See
[requesters](/channels/overview#requesters-and-what-verified-means) for what
that means and why.

## On a phone

Two choices:

* **Full screen**, the default and almost always right. A floating chat panel
  over a phone screen has no room to be useful.
* **Floating panel**, for the rare case where your site is itself a full-screen
  mobile app that cannot give up the view.

## Turning it off

The **Pause** switch on the placement stops the key from resolving. The widget
then renders nothing at all, not a broken panel, so you can pause it without
touching your site's code.

Conversations that already arrived stay in your inbox.
