---
title: Collecting user feedback
description: Collect user feedback when errors occur in Ruby applications to get context directly from affected users.
url: https://docs.honeybadger.io/lib/ruby/errors/collecting-user-feedback/
---

The Honeybadger gem has a few special tags that it looks for whenever you render an error page in a Rack-based application. These can be used to display extra information about the error, or to ask the user for information about how they triggered the error.

## Installing the middleware

Honeybadger installs the middleware automatically in Rails projects. For all other applications, the middleware must be installed manually:

```ruby
use Honeybadger::Rack::UserInformer
use Honeybadger::Rack::UserFeedback
```

## Displaying the error ID

When an error is sent to Honeybadger, our API returns a unique UUID for the occurrence within your project. This UUID can be automatically displayed for reference on error pages.

To include the error id, simply place this magic HTML comment on your error page (normally `public/500.html` in Rails):

```html
<!-- HONEYBADGER ERROR -->
```

By default, we will replace this tag with:

```plaintext
Honeybadger Error {{error_id}}
```

Where `{{error_id}}` is the UUID. You can customize this output by overriding the `user_informer.info` option in your honeybadger.yml file (you can also enabled/disable the middleware):

config/honeybadger.yml

```yaml
user_informer:
  enabled: true
  info: "Error ID: {{error_id}}"
```

You can use that UUID to load the error at the site by going to [https://app.honeybadger.io/notice/some-uuid-goes-here](https://app.honeybadger.io/notice/).

## Displaying a feedback form

When an error is sent to Honeybadger, an HTML form can be generated so users can fill out relevant information that led up to that error. Feedback responses are displayed inline in the comments section on the fault detail page.

To include a user feedback form on your error page, simply add this magic HTML comment (normally `public/500.html` in Rails):

```html
<!-- HONEYBADGER FEEDBACK -->
```

You can change the text displayed in the form via the Rails internationalization system. Here’s an example:

config/locales/en.yml

```yaml
en:
  honeybadger:
    feedback:
      heading: "Care to help us fix this?"
      explanation:
        "Any information you can provide will help us fix the problem."
      submit: "Send"
      thanks: "Thanks for the feedback!"
      labels:
        name: "Your name"
        email: "Your email address"
        comment: "Comment (required)"
```

The feedback form can be enabled and disabled using the `feedback.enabled` config option (defaults to `true`):

config/honeybadger.yml

```yaml
feedback:
  enabled: true
```

---

## Try Honeybadger for FREE

Intelligent logging, error tracking, and Just Enough APM™ in one dev-friendly platform. Find and fix problems before users notice.

[Start free trial](https://app.honeybadger.io/users/sign_up)

[See plans and pricing](https://www.honeybadger.io/plans/)
