Collecting user feedback in JavaScript

Show a responsive, highly-customizable feedback form when a user encounters an error—and let them describe the issue in their own words!

With just a few lines of code, Honeybadger notifies you of errors in your app, allowing you to address issues as early as possible—sometimes even before your users notice them. When an error occurs, we try to make bug fixing a smooth process by providing lots of context:

  • Framework integrations pull in data from web requests and background jobs
  • Breadcrumbs tell a story of what happened before each error
  • Source maps reveal the true location of the bug in minified code
  • ...and much more.

Some errors are especially tricky, though. There may not be enough information to understand what's going on. Wouldn't it be great if you could just ask the user what happened?

Well, now you can.

Introducing user feedback for JavaScript

We just shipped an update to our JavaScript integration to display a responsive, highly-customizable form when a user encounters an error:

When an error occurs, the form will be displayed—notifying the user of the issue and allowing them to add their account of what happened. After they submit the form, their comment is added to the error in Honeybadger:

Try it for yourself

After you upgrade to the most recent @honeybadger-io/js NPM package, enabling the user feedback form is just a few lines of code:

// Assuming that Honeybadger is already setup and accessible
// via a `Honeybadger` variable
Honeybadger.afterNotify((err, notice) => {
    Honeybadger.showUserFeedbackForm()
})

Alternatively, you can show the form when notifying Honeybadger manually:

Honeybadger.notify(error, {
    afterNotify: () => {
        Honeybadger.showUserFeedbackForm()
    }
})

Interesting? We think so. Check out the docs to learn more. Remember, there are no unfixable bugs. See you next time!

What to do next:
  1. Try Honeybadger for FREE
    Honeybadger helps you find and fix errors before your users can even report them. Get set up in minutes and check monitoring off your to-do list.
    Start free trial
    Easy 5-minute setup — No credit card required
  2. Get the Honeybadger newsletter
    Each month we share news, best practices, and stories from the DevOps & monitoring community—exclusively for developers like you.
    author photo

    Pangratios Cosma

    Pan is a software engineer with a knack for solving challenging engineering problems. He tries to exercise every once in a while and enjoys spending time with his family.

    Stop wasting time manually checking logs for errors!

    Try the only application health monitoring tool that allows you to track application errors, uptime, and cron jobs in one simple platform.

    • Know when critical errors occur, and which customers are affected.
    • Respond instantly when your systems go down.
    • Improve the health of your systems over time.
    • Fix problems before your customers can report them!

    As developers ourselves, we hated wasting time tracking down errors—so we built the system we always wanted.

    Honeybadger tracks everything you need and nothing you don't, creating one simple solution to keep your application running and error free so you can do what you do best—release new code. Try it free and see for yourself.

    Start free trial
    Simple 5-minute setup — No credit card required

    Learn more

    "We've looked at a lot of error management systems. Honeybadger is head and shoulders above the rest and somehow gets better with every new release."
    — Michael Smith, Cofounder & CTO of YvesBlue

    Honeybadger is trusted by top companies like: