Skip to content

Latest commit

 

History

History
77 lines (45 loc) · 4.58 KB

File metadata and controls

77 lines (45 loc) · 4.58 KB
title sidebar_title description sidebar_order
Set Up User Feedback
User Feedback
Learn how to enable User Feedback in your app.
6000

The User Feedback feature allows you to collect user feedback from anywhere inside your application at any time, without needing an error event to occur first. The Crash-Report Modal feature, on the other hand, lets you prompt for user feedback when an error event occurs.

If you're using a self-hosted Sentry instance, you'll need to be on version 24.4.2 or higher in order to use the full functionality of the User Feedback feature. Lower versions may have limited functionality.

<PlatformSection notSupported={["javascript.node", "javascript.aws-lambda", "javascript.azure-functions", "javascript.connect", "javascript.express", "javascript.fastify", "javascript.gcp-functions", "javascript.hapi", "javascript.hono", "javascript.koa", "javascript.nestjs", "javascript.deno", "javascript.cloudflare", "javascript.bun", "javascript.cordova", "javascript.wasm"]}>

User Feedback Widget

The embeddable JavaScript widget allows users to submit feedback from anywhere inside your application. The Crash-Report Modal collects reactive feedback tied to an error event.

An example feedback image of the User Feedback Widget on a demo site

Pre-requisites

Installation

Set Up

To set up the integration, add the following to your Sentry initialization. There are many options you can pass to the integration constructor. See the configuration documentation for more details.

By default, this will insert the widget into the bottom right corner of your website. You're free to customize nearly every aspect of the widget, including replacing it completely with your own UI.

On SDK version 8.0.0 and above, users can send screenshots with their feedback. If you're self-hosting, you also need release 24.4.2 and above. You can configure this using the enableScreenshot option, by default it is set to true. Screenshots aren't supported on mobile devices, so the screenshot button will be hidden automatically in this case.

Screenshots use your [attachments quota](/pricing/quotas/manage-attachments-quota). All plans come with 1GB of attachments, which is approxiamately 2500 screenshots.

Session Replay

The User Feedback widget integrates easily with Session Replay. First, make sure that the Session Replay integration is configured correctly and that replaysOnErrorSampleRate is greater than 0. When this is done, the Replay SDK will buffer up to 30 seconds of the user's session until the user opens the User Feedback widget. If the user submits feedback, you'll be able to view the feedback (including the replay), in sentry.io.

User Feedback API

The user feedback API allows you to collect user feedback while utilizing your own UI. You can use the same programming language you have in your app to send user feedback. In this case, the SDK creates the HTTP request so you don't have to deal with posting data via HTTP.

You can optionally pass in an associatedEventId to associate user feedback with an error event, giving you additional insight into issues. To get an event ID, you have 2 options:

  1. Use the return value of a method capturing an event.
  2. Use {' '}and Sentry.lastEventId().

Crash-Report Modal

Our embeddable, JavaScript-based, Crash-Report modal is useful when you would typically render a plain error page (the classic 500.html) on your website.

To collect feedback, the Crash-Report modal requests and collects the user's name, email address, and a description of what occurred. When feedback is provided, Sentry pairs the feedback with the original event, giving you additional insights into issues.

The screenshot below provides an example of the Crash-Report modal, though yours may differ depending on your customization:

Integration

The modal authenticates with your public DSN, then passes in the Event ID that was generated on your backend.