Collecting User Feedback

We don't want our users to be interrupted by errors, but sometimes it does happen. Honeybadger helps you work with your users to fix errors by allowing them to leave feedback when an error occurs.

Displaying a Feedback Form

A form to collect user feedback can be displayed as a modal dialog.

Feedback form

Honeybadger will link this feedback with the last error reported, hence it is required that an error needs to be reported first before displaying it.

javascript
// we have to wait for the error to be reported and then call `showUserFeedbackForm()` Honeybadger.notify(error, { afterNotify: () => { Honeybadger.showUserFeedbackForm() } })

Note: Calling Honeybadger.showUserFeedbackForm() before an error is successfully reported to Honeybadger will not show the form dialog.

Additionally, you may choose to always the feedback form for every error that occurs by setting a global afterNotify handler:

javascript
Honeybadger.afterNotify((err, notice) => { Honeybadger.showUserFeedbackForm() })

Form Customization

You can customize all the messages and labels of the form simply by setting an options object when calling Honeybadger.showUserFeedbackForm(). The following customization is available (the defaults are shown):

javascript
Honeybadger.showUserFeedbackForm({ messages: { heading: 'Care to help us fix this?', explanation: 'Any information you can provide will help our technical team get to the bottom of this issue.', thanks: 'Thanks for the feedback!', }, buttons: { submit: 'Send', cancel: 'Cancel', }, labels: { name: 'Name', email: 'Your email address', comment: 'Comment (required)', } })

Viewing User Feedback

You can find feedback from your users under the Comments tab of a Honeybadger error.