On this page

A SMALL ADDITION TO YOUR SITE

From install to
your first report.

Add the widget, send a report, and find the context in your workspace. Start with the quickstart, then make it fit your site.

✓ Screenshots on✓ Console capture on○ Click tracking off○ Automatic reports off

Building a website with an AI assistant? Use the agent installation guide and OpenAPI schema to prepare a widget and give its owner a direct setup link.

01

Get your first report in.

  1. Create a project and copy its public key.

    In Projects, create a project and use its public widget key. Keep private keys on your server.

  2. Add the script and initialize once.

    Place this just before your closing </body> tag. Replace YOUR_PUBLIC_KEY with your project's public key.

HTML · before </body>
<script src="https://bugerz.com/javascripts/bugerz.min.js"></script>
<script>
  BugerZ.init({
    publicKey: 'YOUR_PUBLIC_KEY'
  });
</script>

The widget adds a “Report Bug” button in the bottom-right corner. Click tracking and automatic error reporting are off by default; you do not need to set either option in the basic initializer. The reporter can describe the problem and submit it without a Bugerz account.

Finish with a real check. Open the widget, send a disposable report, and find it in your Issues list. Delete the test report when you're done; normal report and storage limits apply.

The screenshot helper loads on demand when a screenshot is needed. Use one script source and one initializer per page.

The browser client is also available from jsDelivr and GitHub Pages. These mirror the public client repository; choose one script host. Branch and CDN copies may be cached. Download the client from GitHub if you prefer to host it yourself.

02

Use your own button.

Keep a report action in your header, help menu, or anywhere it belongs. Set addButton: false and open the form with BugerZ.show().

Use this initializer instead of the quickstart version above.

HTML + JavaScript
<button id="report-a-bug" type="button">Report a bug</button>
<script src="https://bugerz.com/javascripts/bugerz.min.js"></script>
<script>
  BugerZ.init({
    publicKey: 'YOUR_PUBLIC_KEY',
    addButton: false
  });

  document.getElementById('report-a-bug').addEventListener('click', () => {
    BugerZ.show();
  });
</script>

Style the button with your site's CSS. A native <button> also works with a keyboard.

03

Make it fit your site.

Pass configuration to BugerZ.init(). These are the current defaults for the most-used options.

Common Bugerz configuration options
OptionDefaultWhat it does
publicKeyRequiredThe project's public widget key.
addButtontrueAdd the built-in report button.
buttonText'Report Bug'Change the built-in button's label.
placement'bottom-right'bottom-right, bottom-left, top-right, or top-left.
openOnInitfalseOpen the form immediately after initialization.
screenshottrueTry to attach a capture of the page.
screenshotOptions.mode'viewport'Visible area: capture what the reporter can see at their current scroll position. Use 'full-page' for the entire page.
screenshotOptions.imagePlaceholdertrueReplace unavailable images with the built-in placeholder. Supply an image data URL for a custom fallback, or false to disable replacement.
trackConsoletrueBuffer console messages for the next report.
trackEventsfalseOpt in to click breadcrumbs, available in Basic and Pro. This does not record typing.
autoSendOnErrorfalseLegacy opt-in automatic reporting when console.error is called. Prefer report() for deliberate application errors.
showEmailFieldtrueShow the optional reporter email field.
showPublicCheckboxfalseShow a “Make public” checkbox. Server-side plan and privacy rules still apply.
consoleBufferSize100Maximum console entries buffered in memory.
eventBufferSize100Maximum click entries when tracking is enabled.
screenshotTimeout8000 msTotal time allowed for screenshot loading, capture, and a fallback attempt.
requestTimeout15000 msTime allowed for the report's HTTP request.
filterCrossOriginfalseExclude selected cross-origin images, iframes, and stylesheet elements from captures.
endpointHosted APIDefaults to https://bugerz.com/api/report.

Match your colors and typography.

Use cssVars inside your initializer. Your overrides merge with the widget's defaults.

JavaScript · use inside your initializer
cssVars: {
  '--bz-primary': '#b64e22',
  '--bz-bg': '#ffffff',
  '--bz-color': '#25211e',
  '--bz-radius': '10px',
  '--bz-font': 'system-ui, sans-serif'
}
04

The JavaScript API.

The browser global is BugerZ, with a capital B and Z.

BugerZ.init(options)

Configure the widget once. Requires publicKey.

BugerZ.show()

Open the report form.

BugerZ.hide()

Close the report form.

BugerZ.toggle()

Open or close the form.

BugerZ.report(fields, options)

Send a report from your application and return a Promise.

Report an application error deliberately.

Call report() after initialization, at a point where your app knows what happened. Choose which fields are safe to send.

JavaScript · after BugerZ.init()
async function reportSaveFailure() {
  try {
    const result = await BugerZ.report(
      { description: 'The save operation failed.', action: 'save_failed' },
      { screenshot: false }
    );
    return result;
  } catch (error) {
    // Show a useful error in your app. Avoid an automatic retry loop.
    console.warn('Report not sent:', error.message);
    throw error;
  }
}

report() doesn't open the form or invoke the widget's onSuccess/onError UI callbacks. Handle the returned Promise yourself. The per-call screenshot: false option skips the image for that report.

Handle widget submission callbacks.

Callbacks receive the saved report response or an error. Supplying a callback replaces the default success or error message.

JavaScript · use inside your initializer
onSuccess: (result) => {
  // A URL is present only when the project allows sharing this report.
  if (result.showLink && result.url) {
    console.info('Report link:', result.url);
  }
},
onError: (error) => {
  console.warn('Report not sent:', error.message);
}
05

Choose what gets captured.

Reports can include a screenshot, the page URL and title, browser information, and buffered console messages. Optional click tracking records the element tag, click coordinates, and timestamp.

Exclude private page sections.

Add data-bugerz-private to a section to exclude it from screenshots and click breadcrumbs. Password inputs and the widget itself are also excluded from screenshots.

HTML
<section data-bugerz-private>
  <p>Account or billing information</p>
</section>

Console output is separate. The private marker doesn't redact anything your application writes to the console. Set trackConsole: false and screenshot: false on sensitive pages when appropriate.

Click tracking is off by default. When enabled, it skips inputs, textareas, editable content, and marked private sections. It doesn't record keystrokes or field values. Check your application logs and page URLs before enabling capture on pages with sensitive data.

06

Keep the picture useful.

Set the screenshot area in your initializer with screenshotOptions.mode. Visible area ('viewport', the default) captures what the reporter can see at their current scroll position. Full page ('full-page') captures the entire page from top to bottom, including content outside the visible area.

The configured area is used for reports submitted through the widget.

Capture happens when the report is sent. The widget uses PNG by default, at a pixel ratio of 1, and skips font embedding. If a scrolled capture fails or stalls, the widget retries a standard capture from the top, keeping the configured image dimensions and privacy filters without scrolling your live page. If media also prevents standard capture, a final retry omits media to retain the page’s text and layout. All attempts share the screenshot timeout. If every attempt fails, the description still sends. Full-page captures can produce larger attachments.

For smaller screenshots, choose JPEG. Unavailable images are replaced with the built-in placeholder by default so the rest of the screenshot can still be captured.

JavaScript · use inside your initializer
screenshot: true,
filterCrossOrigin: false,
screenshotOptions: {
  mode: 'viewport', // 'full-page' captures the entire page
  imagePlaceholder: true, // built-in fallback for unavailable images
  type: 'jpeg',
  quality: 0.8,
  pixelRatio: 1,
  skipFonts: true,
  cacheBust: false
}

To choose a different area for one programmatic report, pass { screenshotOptions: { mode: 'full-page' } } as the second argument to BugerZ.report(). Later reports keep the configured default.

Keep useful screenshots when images fail.

The widget embeds an “Image unavailable” placeholder when an image fetch fails, including missing files and cross-origin images that block access. Image elements also recover when the response cannot be decoded as an image. The built-in image needs no separate download or hosting. Replacement happens in the screenshot copy; your live page is unchanged.

Image placeholder settings
imagePlaceholderBehavior
true (default)Use the built-in placeholder.
An image data URLUse your own PNG, JPEG, or SVG fallback. Image elements use the built-in image if the custom fallback fails.
falseDisable image replacement. A failed image may prevent a screenshot from being attached; the report can still send.

You can download the built-in SVG placeholder to adapt it. To use a custom SVG, pass 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(yourSvgMarkup) as screenshotOptions.imagePlaceholder.

Leave filterCrossOrigin: false to try embedding external images and replace failures. Set it to true when you want to omit external images and iframes entirely. Filtered elements are removed before placeholders are applied.

Decode recovery applies to image elements; malformed CSS background images may remain blank. Placeholders do not bypass cross-origin restrictions or make iframe content capturable. Other capture failures, including an unavailable screenshot helper or a timeout, can still leave the report without an image.

For finer control, pass a screenshotOptions.filter(node) function that returns false for nodes to omit. The widget's private-section and password filters still apply.

07

Understand who can see a report.

A shareable report link is returned only when the project's “Show bug link” setting is enabled and the report is shareable under its plan and privacy settings.

  • Private: restricted to the authorized team. Entering a reporter email doesn't grant access.
  • Private with a link: anyone with that link can open the guest view. Treat the URL as a secret.
  • Public: available under the project's public-sharing rules.

The guest view currently omits screenshots, console logs, events, email, and machine details. Team access controls still apply to editing and diagnostics. Free projects keep reports private.

The homepage demo is separate. Its temporary links show the visitor's demo screenshot and a separate, clearly marked dummy-data walkthrough. They expire after 24 hours and do not use an account's report allowance.

Limits count stored reports.

The Free plan holds five reports and 20 MB per project. Delete old reports to make room. Report count and attachment storage limits both apply; the server checks both when a report arrives.

08

When something doesn't look right.

The report button doesn't appear.

Confirm that the script loaded, your public key is set, and BugerZ.init() runs after the page is ready. With addButton: false, use your own button and call BugerZ.show().

The screenshot is missing.

External images, stylesheets, iframes, or a blocked screenshot helper can prevent capture. Try the options in Screenshots. The description can still be submitted without an image.

I sent a report but can't find it.

Open the project associated with the public key used in the initializer. A homepage demo report appears at its temporary link rather than inside your customer project.

The server rejected my report.

Check that the key is valid and hasn't been revoked, that your server configuration allows requests from your site's origin, and that the project has space for another report. If submission fails, the widget keeps the description so the visitor can retry.

The success message has no report link.

Check your project's sharing settings and plan. A private report doesn't become shareable simply because an email address was entered.

Current widget behavior

Click tracking and automatic reporting are off by default. Screenshot capture and report requests have timeouts. BugerZ.report() supports deliberate reporting from your app.

Inspect the readable widget source