# Adding the Support Widget to Your Site

The support widget puts your docs directly on your own site. Visitors can search articles and get AI answers without leaving the page they're on, and when the AI can't answer, the widget surfaces your support email so nobody hits a dead end.

![The Clayo support widget open in the bottom-right corner of an example marketing site, showing the Ask tab with suggested articles and a question box](https://d1fz24v557o32j.cloudfront.net/project-images/0319adcc-8d8c-4b62-8847-5f6ca52a92ff/f73c2ce7-b371-4ee5-87d2-c7ab0378c1cf.png "The widget open on a customer site: visitors can ask a question or browse your docs without leaving the page")

## Get your embed code

1. Open **Settings → Widget** in your Clayo dashboard.
2. Copy the embed snippet. It looks like this:

```html
<script src="https://app.clayo.com/embed.js" data-subdomain="your-subdomain" async></script>
```

The `data-subdomain` value ties the widget to your project's docs, so always copy the snippet from your own settings page rather than typing it by hand.

## Add it to your site

Paste the snippet just before the closing `</body>` tag on every page where you want the widget to appear. The script loads asynchronously, so it won't slow your site down.

:::callout{type="info"}
The widget works anywhere you can add a script tag: plain HTML, React, Next.js, Webflow, or your marketing site's custom code section.
:::

## Restrict which sites can embed it

By default, any site with your snippet can load the widget. To lock it down, add your domains under **Allowed domains** in **Settings → Widget** as a comma-separated list, for example `acme.com, app.acme.com`. Browsers will block the widget on any site not in the list. Leave the field blank to allow embedding anywhere.

## Set your support email

When the AI can't answer a question from your docs, the widget falls back to showing your support email. Make sure it's set in your project settings so visitors always have a way to reach you.
