Eleventy

Feedback widget
for Eleventy.

Add one tag to your base layout. No JS framework, no hydration.

Eleventy is a static site generator with no client runtime of its own, so the widget is the only JavaScript you are adding. Put the script in your base layout and every templated page inherits it.

~12kb
gzipped
0
config
MIT
license
Install1 step
> _includes/layouts/base.njk· html
<!doctype html>
<html lang="en">
  <body>
    {{ content | safe }}

    <script src="https://unpkg.com/@usero/sdk"></script>
    <script>
      Usero.initUseroFeedbackWidget({ clientId: "YOUR_CLIENT_ID" });
    </script>
  </body>
</html>

Replace YOUR_CLIENT_ID with the id from your Usero dashboard.

Built for Eleventy

Why teams shipping with Eleventy pick Usero.

One base layout, every page

Eleventy layouts chain, so adding the script to your top-level base layout means every page that extends it ships the widget.

No client framework

Eleventy outputs plain HTML with no runtime. The widget is the only script in play, so there is nothing for it to conflict with.

Works with any template language

Nunjucks, Liquid, Handlebars, plain HTML. The script tag is template-agnostic, so the layout language you use does not matter.

Passthrough-copy if self-hosting

Prefer not to use a CDN? Add the bundle to a passthrough-copy directory and reference the local path from your layout.

Canny pulls a 200kb iframe onto an otherwise script-free Eleventy page. Usero is one 12kb script, in keeping with a static site.
vs Canny script

FAQ

Quick answers, Eleventy edition.

Where do I add the script?

In your base layout file (often _includes/layouts/base.njk), before </body>. Pages that extend that layout then carry the widget automatically.

Does Eleventy need a plugin for this?

No. The script tag is plain HTML in a layout. No Eleventy plugin, no JavaScript config change is required.

Can I self-host the bundle?

Yes. Use addPassthroughCopy to copy the @usero/sdk IIFE build into your output, then reference that local path instead of the CDN.

Will it work with Eleventy data cascade?

It is independent of the data cascade. If you want a per-site client id from data, interpolate a template variable into the init call.

Ship a feedback widget in your Eleventy app today.

Free tier. No credit card. Two-minute install. Cancel by deleting two lines of code.

Get started free