# Install the widget

> Add the Tirver messenger to your product with one script tag.

The widget is a small launcher that opens the messenger. Once it loads, customers can write to you, search your help articles and vote on ideas, depending on which modules are on.

## Add the script

1. In Tirver open **Settings, Messenger, Install**.
2. Choose your language: HTML, React, Vue or Next.js.
3. Select **Copy snippet**.
4. Paste it before the closing `body` tag on every page where the widget should appear.

The HTML version is a single tag. It carries your public widget id, which is safe to show in page source.

```html
<script async src="https://app.tirver.com/tirver.js" data-widget-id="YOUR_WIDGET_ID"></script>
```

The React, Vue and Next.js snippets do the same thing from a component, so the script loads once and is removed when the component goes away.

## Check that it works

1. Open your product in a new tab.
2. Look for the launcher in the bottom corner. Its colour and side come from [your widget settings](https://tirver.com/help/customize-the-widget.md).
3. Open it and send a test message.
4. In Tirver, open the inbox. The message appears under **Unassigned**, and the install page shows **Receiving data**.

Until the first visitor arrives, the install page says **Waiting for the first visitor**.

## Control the widget from code

The script adds a `Tirver` object to the page.

```js
Tirver.open();      // open the messenger
Tirver.close();     // close it
Tirver.toggle();    // open or close
Tirver.shutdown();  // remove the widget, for example on sign out
```

## If the launcher does not appear

- Check that the script is on the page and the widget id is yours.
- If you set [allowed domains](https://tirver.com/help/allowed-domains.md), the page's domain must be on the list.
- Make sure a content security policy on your site allows scripts and frames from app.tirver.com.

Next: [identify signed-in customers](https://tirver.com/help/identify-signed-in-customers.md) so conversations follow them across devices.

Source: https://tirver.com/help/install-the-widget
