Install · Astro

Bug reports and feedback from your Astro site, in one script tag.

Add an Astro feedback widget and bug report button with one script tag in your base layout. No integration to install and nothing added to your build.
Start freeNo credit card required.

Where it goes

In the base layout under src/layouts, just before the closing body tag, with the is:inline directive so Astro leaves it alone.

Setup

Adding the widget to Astro

  1. 01

    Copy your widget key

    From the Widget tab of your project in UserWants. The key begins with uw_pk_ and is public by design — it is written into static HTML that anyone can view, and the domain allowlist is what stops it working elsewhere.

  2. 02

    Add the tag to your base layout

    Astro sites almost always have one layout every page wraps in. Put the tag there and every route gets it. The is:inline directive is the important part: without it, Astro tries to process and bundle the script instead of emitting the tag you wrote.

    astro
    ---
    // src/layouts/Base.astro
    ---
    <html lang="en">
      <body>
        <slot />
        <script
          is:inline
          src="https://userwants.app/widget.js"
          data-userwants-key="uw_pk_..."
          defer
        ></script>
      </body>
    </html>
  3. 03

    Allow your domain

    Add your production hostname under Allowed domains in the Widget tab. The list fails closed, so the widget stays on localhost until you do. If you deploy previews on Netlify or Vercel, add a wildcard entry rather than one hostname per branch.

  4. 04

    Identify signed-in users, if the site has them

    Most Astro sites are public and can skip this. If yours has sessions, call identify from an inline script once you know who the visitor is, and the widget stops asking for an email address.

    html
    <script is:inline>
      window.UserWants?.identify({
        identifier: 'user_123',
        email: 'ada@example.com'
      });
    </script>

Worth knowing

What bites on Astro

The things that are specific to a static site framework, rather than true of every install.
  • Without is:inline the tag disappears

    Astro treats a plain script element as something to bundle. It will try to process a remote src, and what ends up in your built HTML is not the tag you wrote. is:inline tells it to emit the markup verbatim.

  • View Transitions re-run scripts

    If you use the ClientRouter, inline scripts re-execute on navigation. The widget ignores a second initialisation, so this is harmless — but do not add your own guard expecting it to be needed.

  • Islands are irrelevant here

    The widget is not a component and has no hydration directive. It loads once with the document, regardless of which islands are on the page or which client: directive they use.

FAQ

Questions

Does the Astro feedback widget need an integration or adapter?
No. There is nothing to add to astro.config and no package to install. It is one script tag in your layout, which means a fully static build with no adapter and no server output works exactly the same.
Will it slow down my Lighthouse score?
The file is deferred, so it never blocks rendering or parsing, and it is fetched after your page is interactive. It is around 12 KB over the wire compressed, loaded from a CDN on a single request.

The full reference — every field the widget collects, the domain allowlist rules and the JavaScript API — is in the widget docs.

Try it on your Astro site.

Paste the tag, add your domain, and the next report arrives with the screenshot and the JavaScript error already attached.