> For the complete documentation index, see [llms.txt](https://help.clickatell.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.clickatell.com/web-chat/how-to-add-your-widget-to-your-website.md).

# How to add your widget to your website

Clickatell will provide you with an embed code that you need to copy + paste. The embed code is two lines of HTML, and it already contains your Widget ID.&#x20;

1. Copy the embed code supplied by Clickatell.&#x20;
2. Paste both lines into the HTML of each page where the widget should appear.&#x20;
3. Publish the page.&#x20;
4. Open the page and confirm that the launcher appears.&#x20;
5. Send a message and confirm that your workflow replies.&#x20;

The embed code looks like this, with your own Widget ID in place:&#x20;

{% code overflow="wrap" lineNumbers="true" %}

```
<web-chat widget-id="YOUR-WIDGET-ID"></web-chat> 
<script src="https://wbc-widget.clickatell.com/main.js" type="module"></script> 
```

{% endcode %}

{% hint style="info" %}
The widget keeps itself up to date. It loads the current released version from Clickatell each time one of your pages is opened, so you never have to change your website to pick up an improvement. A newly released version takes about ten minutes to reach every visitor.
{% endhint %}

#### Secure your widget

*Allowed Origins* is the list of websites permitted to use your widget. Each entry takes the form <https://yourdomain.com>. The list is enforced by Clickatell rather than in the browser, so a request from anywhere else is refused before a conversation can start.

{% hint style="danger" %}
If no allowed origins are configured, there are no restrictions at all. Anyone who has your Widget ID could embed your widget on their own website. Give Clickatell your allowed origins before you go live.
{% endhint %}

Web Chat does not transmit or store personal details such as a phone number or an email address. A conversation is identified by a session only, which is why a visitor is not recognized from one conversation to the next.&#x20;

Files your business sends to a visitor are shared through a download link that expires one hour after it is sent, and the files themselves are kept for 31 days. Anyone holding the link can open the file until it expires, so Web Chat is not suitable for sending confidential documents.&#x20;

{% hint style="info" %}
Keep the restrictions open while you are still testing, then lock access down to your own websites before you go live. Remember to include every domain you embed the widget on, including any staging site you still want to work.
{% endhint %}
