---
title: "Add a bug report button to your website — bugd.one"
description: "Embed a feedback widget with screenshots, annotation and “My reports” via one script tag — options, environments, privacy link and self-hosting via ZIP."
url: https://bugd.one/guides/bug-report-button-website?lang=en
language: en
updated: 2026-11-22
type: guide
author: Eduard Ditler
alternate_de: https://bugd.one/guides/bug-report-button-website
alternate_en: https://bugd.one/guides/bug-report-button-website?lang=en
---
Guide · Last updated: 2026-11-22

# Add a bug report button to your website

Embed a feedback widget with screenshots, annotation and “My reports” via one script tag — options, environments, privacy link and self-hosting via ZIP.

Language: [Deutsch](https://bugd.one/guides/bug-report-button-website)

> **In short**
>
> - Two lines: `import { initBugdone } from 'https://bugd.one/widget.js'` and `initBugdone({ projectKey, host: 'https://bugd.one' })` — and the button appears at the bottom right.
> - Users report with a screenshot (paste, upload, drag and drop) and can **annotate** it before sending. Console errors and the page URL are attached automatically.
> - Through **“My reports”** reporters see status and your replies inside your page and can reply; by email they hear about status changes if they gave an address.
> - Privacy: no tracking, name and email optional, consent only when provided, your own privacy policy via `privacyUrl`. Cost: free 7-day trial, then from €9.90 per month (incl. VAT).

If you only learn about bugs from reviews or emails, you have usually missed them dozens of times. A bug report button right on the page lowers the barrier: the user clicks, describes the problem in two sentences and attaches a screenshot. All reports land centrally in the bugd.one dashboard, with context.

## Prerequisites

- A bugd.one project and its **publishable key** (`bk_live_…`) under **Project → Settings**. The key can safely live in the frontend.
- Any website or web app (static, React, Vue, Svelte, Angular …). You do not need a backend.

![Project settings with API key and allowed domains](https://bugd.one/screenshots/docs-api-key.webp)
*Project → Settings: this is where you find the API key (bk_live_…) and set the allowed domains.*

## Step by step

### Step 1: Embed the widget with a script tag

Add this before the closing `</body>`:

```html
<script type="module">
  import { initBugdone } from 'https://bugd.one/widget.js'

  initBugdone({
    projectKey: 'bk_live_YOUR_PROJECT_KEY',
    host: 'https://bugd.one',
    appVersion: '2.4.1',
  })
</script>
```

Without module support use the UMD file, which provides the global object `Bugdone`:

```html
<script src="https://bugd.one/widget.umd.js"></script>
<script>
  Bugdone.initBugdone({ projectKey: 'bk_live_YOUR_PROJECT_KEY', host: 'https://bugd.one' })
</script>
```

The widget is a single file with no dependencies and loads asynchronously. A button appears on the page; a click opens the form.

### Step 2: Use it in a framework

In React, Vue and the like the simplest way is the npm package: `npm install @bugdone/widget`, then `import { initBugdone } from '@bugdone/widget'` and call `initBugdone({ projectKey, host })`. Without the package, load the UMD script once at runtime and call `initBugdone`. In short:

```ts
// bugdone.ts
let loading: Promise<any> | undefined

export function loadBugdone() {
  const w = window as any
  if (w.Bugdone) return Promise.resolve(w.Bugdone)
  loading ??= new Promise((resolve, reject) => {
    const s = document.createElement('script')
    s.src = 'https://bugd.one/widget.umd.js'
    s.async = true
    s.onload = () => (w.Bugdone ? resolve(w.Bugdone) : reject(new Error('widget missing')))
    s.onerror = () => { loading = undefined; reject(new Error('widget failed to load')) }
    document.head.appendChild(s)
  })
  return loading
}

// e.g. in useEffect / onMounted:
const { initBugdone } = await loadBugdone()
const widget = initBugdone({ projectKey: 'bk_live_YOUR_PROJECT_KEY', host: 'https://bugd.one' })
// on cleanup: widget.destroy()
```

Ready-made examples for React, Vue, SvelteKit and Angular are in the [documentation](https://bugd.one/docs#frameworks).

### Step 3: Adjust look and behavior

The most important options:

| Option | Default | Effect |
| --- | --- | --- |
| `position` | `'bottom-right'` | button at the bottom right or `'bottom-left'` |
| `triggerStyle` | `'pill'` | `pill`, `pill-always`, `icon`, `text`, `tab`, `hidden` |
| `triggerSize` | `'md'` | `sm` (36 px), `md` (44 px), `lg` (56 px) |
| `triggerLabel` | `Report Bug` | custom button text |
| `primaryColor` | `#0d9488` | brand color as hex value |
| `locale` | automatic | widget language: `de`, `en` and more, otherwise English |
| `labels` | – | up to 10 labels on every report |
| `metadata` | – | your own extra data as a flat object |
| `hideBranding` | `false` | hide “Powered by bugd.one” |

```js
initBugdone({
  projectKey: 'bk_live_YOUR_PROJECT_KEY',
  host: 'https://bugd.one',
  triggerStyle: 'tab',
  primaryColor: '#0d9488',
  labels: ['website'],
  metadata: { plan: 'premium' },
})
```

With `triggerStyle: 'hidden'` you hide the button and open the form with `widget.open()` from your own menu, such as a help dialog.

![Widget settings in the dashboard with a live preview of the button](https://bugd.one/screenshots/docs-widget-config.webp)
*Project → Widget: pick style, size, position, colour and text — preview and code update instantly.*

### Step 4: User, version and environment

`appVersion` shows up in the dashboard as “found in version”. With `identify` you pass your own user ID:

```js
const widget = initBugdone({ projectKey: 'bk_live_YOUR_PROJECT_KEY', host: 'https://bugd.one', appVersion: '2.4.1' })

// after login
widget.identify({ id: currentUser.id, email: currentUser.email })
```

Only the `id` is sent. `email` and `name` merely prefill the visible form fields — the reporter can change or delete them. What reaches you is therefore always the user's own decision.

The widget detects the **environment** itself: `localhost`, `127.0.0.1`, `*.local`, `*.test` and private IPs are `development`, everything else `production`. For staging set `environment: 'staging'`. Reports from non-production appear in the dashboard with a DEV marker but send **no emails, webhooks or chat messages**.

### Step 5: Configure privacy properly

For the data the widget collects, **you** are the controller. Set `privacyUrl` to your own privacy policy — the link appears next to the consent checkbox:

```js
initBugdone({
  projectKey: 'bk_live_YOUR_PROJECT_KEY',
  host: 'https://bugd.one',
  privacyUrl: 'https://example.com/privacy',
})
```

The form tells the reporter what is sent along: browser and operating system, the current page without query string, the app version, the latest console errors and screenshots. Console and network data are cleaned before storage (URL parameters, email addresses, tokens and password-like values). With `captureConsole: false` you switch capturing off completely. Also add the service provider bugd.one to your own privacy policy; the data processing agreement is at [/datenschutz/avv](https://bugd.one/datenschutz/avv).

![Widget form with name, e-mail address and a ticked consent checkbox](https://bugd.one/screenshots/widget-consent.webp)
*The consent checkbox only appears once a name or e-mail is entered — without them the report is sent anonymously.*

### Step 6: “My reports” and follow-up questions

After submitting, the widget receives a reporter token for exactly this report and stores it locally in the browser (`localStorage`). As soon as a report exists, the widget shows **My reports**: a list with status badges, a detail view with your public replies and a reply box. Internal team comments are never visible to the reporter. If the reporter gave an email address, they also get emails for status changes and replies. You can switch the view off with `showMyReports: false` or open it yourself:

```js
widget.openMyReports()

// build your own UI:
const reports = widget.getMyReports()
const { report, messages } = await widget.getReport(reports[0].id)
await widget.replyToReport(reports[0].id, 'Also happens in Firefox')
```

Callbacks such as `onSubmit({ id, bug_number, status_url })`, `onError`, `onOpen` and `onClose` help you tie reports into your analytics or UI.

### Step 7: Test it

Open your page, click the button, write a test report, paste a screenshot with Ctrl+V and send it. Locally it runs as `development` — the report shows up in the dashboard with a DEV marker and no emails go out. Then deploy to production and check that the environment is right.

![Bug detail view with description, console output, metadata and screenshot](https://bugd.one/screenshots/bug-detail.webp)
*Bug detail: screenshot, page, browser and console errors arrive automatically. Change the status and the reporter is notified.*

## Alternative: self-host via ZIP

If you do not want to load scripts from third parties, download the [widget ZIP](https://bugd.one/downloads/bugdone-widget.zip). It contains `widget.js`, `widget.umd.js` and the README. Put the files on your own server and change the script URL; reports still go to `host: 'https://bugd.one'`.

## Limits and notes

> **Good to know**
>
> - **No session replay.** The widget records nothing; `enableReplay` has no effect.
> - **The publishable key is public.** Protect yourself with the **Allowed Domains** in the project settings (applies to browser requests); outside browsers, rate limits and quotas apply.
> - **No active plan:** reports are unlimited in Pro, Team and the trial. If the trial has ended and no plan is booked, the API answers with `403 project_read_only`.
> - **The widget is meant for browsers.** In native apps use the `/embed` form in a WebView or the [REST API](https://bugd.one/guides/bug-reports-rest-api?lang=en).

## Further reading

- [Installation in the documentation](https://bugd.one/docs#installation): keys, frameworks, options
- [Send bug reports via REST API](https://bugd.one/guides/bug-reports-rest-api?lang=en): your own form instead of the widget
- [JavaScript error tracking in the browser](https://bugd.one/guides/javascript-error-tracking?lang=en): capture crashes automatically
- [bugd.one vs. Sentry](https://bugd.one/guides/sentry-alternative?lang=en): a comparison including Sentry's user feedback widget

## Frequently asked questions

**Do I need a backend or an npm package?**
No. The widget is a single JavaScript file that you load with a script tag from `https://bugd.one/widget.js` (ES module) or `https://bugd.one/widget.umd.js` (global `Bugdone`). With a bundler you can install the package `@bugdone/widget` instead; alternatively you host the files from the ZIP yourself.

**Who is responsible for the reporters' data?**
You, as the operator of the website or app. bugd.one acts as a processor (DPA at /datenschutz/avv). With the option `privacyUrl` you link your own privacy policy next to the consent checkbox.

**Does the reporter have to enter a name or email?**
No. Without a name and email the report is anonymous and no consent is requested. Only when the reporter enters an email address or a name does the consent checkbox appear and become mandatory.

**Does the widget disturb the layout or CSS of my site?**
No. The widget renders in a Shadow DOM, so its CSS does not collide with yours. It automatically follows the system dark mode (`prefers-color-scheme`).

**Is there session replay?**
No. Session replay was discontinued. The options `enableReplay` and `replayMaskText` are still accepted but have no effect. The widget attaches screenshots, the page URL, browser and the latest console errors.

## Related guides

- [Send bug reports from your own app via REST API](https://bugd.one/guides/bug-reports-rest-api?lang=en) — Your own report form, bugd.one as the backend: send reports via POST, store the reporter token, fetch status and replies, badge counts via status batch.
- [JavaScript error tracking in the browser](https://bugd.one/guides/javascript-error-tracking?lang=en) — Capture uncaught errors and unhandled promise rejections in the browser: crash reporter via script tag (ESM/UMD), releases and source-map upload with curl.
- [bugd.one vs. Sentry: comparison](https://bugd.one/guides/sentry-alternative?lang=en) — An objective comparison of bugd.one and Sentry: pricing, EU data storage, features, platforms and self-hosting — with sources, as of October 2026.

## Up and running in two minutes

Create an account, add a project, paste your key — all Pro features free for 7 days, no credit card required.

[Try free for 7 days](https://bugd.one/login) · [Read the docs](https://bugd.one/docs) · [All guides](https://bugd.one/guides?lang=en)

---

bugd.one — https://bugd.one/guides/bug-report-button-website?lang=en · Overview for AI agents: [llms.txt](https://bugd.one/llms.txt) · API: [openapi.json](https://bugd.one/openapi.json)
