# Install the web widget

Add a feedback button to your website with one script tag, and let your visitors vote and post ideas.

The widget adds a feedback button to your website. The button opens your project's board in a panel, where visitors read the ideas, vote, post new ones and see your roadmap.

You need an organization and a project ([quickstart](https://docs.feedzzie.com/start/quickstart/)), and the **owner** or **admin** role: only they see **Settings › Widget**.

## 1. Turn the widget on

In the dashboard, select the project in the header and open **Settings › Widget**. Under **Widget Status**, turn on **Enable Widget**, then click **Save** at the bottom of the page.

A new project's widget starts off. While it is off, the button still appears on your site, but the panel shows "404: This page could not be found."

## 2. Allow your website's domain

Under **Domain Restrictions**, type your site's domain in **Allowed Domains**, for example `example.com`, click **Add**, and save.

The list decides where the widget can collect feedback:

- **With no domains**, any website can embed the widget, but only to show the ideas: votes and new ideas are refused.
- **With domains**, only pages on those domains can embed it, and there visitors can vote and post ideas.

How a domain matches:

| You add | It matches | It does not match |
|---|---|---|
| `example.com` | `example.com`, on any port | `www.example.com` |
| `*.example.com` | `www.example.com`, `app.example.com` | `example.com`, `a.b.example.com` |
| `localhost:3000` | `localhost:3000` | `localhost:8080` |

You can paste a full URL: the field keeps only the domain (`https://example.com/pricing` becomes `example.com`). The pages must be served over https, except on `localhost` and `127.0.0.1` for local development.

## 3. Let visitors vote and post

Visitors use the widget without an account, so everything they send is anonymous. Under **Permissions**:

- turn on **Allow Anonymous Votes** to let them vote;
- turn on **Allow Anonymous Submissions** to let them post ideas.

Both start off in a new project. While they are off, the vote buttons are disabled and the panel has no **New Idea** tab.

The same section has **Require Email** (visitors must enter their email to post an idea), **Require Description** and **Ideas per visitor per day**.

Click **Save**.

## 4. Add the snippet to your site

Click **Get embed code**. The **Basic Installation** snippet already has your slugs:

```html
<script src="https://feedzzie.com/widget.js" data-org="your-org" data-project="your-project"></script>
```

Paste it at the end of your page's HTML, just before `</body>`, on every page where you want the button.

- `data-org` is your organization's slug. It is required.
- `data-project` is the project whose board the widget shows. Without it, the widget shows your organization's default project.

## 5. Check that it works

Open your page. A **Feedback** button appears in the bottom-right corner. Click it: the panel opens with three tabs, **Ideas**, **Roadmap** and **New Idea**. Vote for an idea and post one. The **Escape** key or a click outside the panel closes it.

A new project starts with **Require approval for new ideas** on (**Settings › Moderation**): ideas from the widget wait in **Moderation** until someone approves them. If you turn it off, they appear on the board and in your dashboard right away.

Changes in **Settings › Widget** can take a couple of minutes to reach the widget. If something does not work, see [troubleshooting](https://docs.feedzzie.com/widget/troubleshooting/).

## Next steps

- [Options](https://docs.feedzzie.com/widget/options/): position, color, icon, text and theme.
- [JavaScript API](https://docs.feedzzie.com/widget/javascript-api/): open the panel from your own button.
- [Troubleshooting](https://docs.feedzzie.com/widget/troubleshooting/): Content Security Policy and other problems.
