|
| 1 | +--- |
| 2 | +title: "User Feedback Basics" |
| 3 | +sidebar_order: 2 |
| 4 | +description: "Learn how to configure and deploy Sentry's User Feedback widget to capture qualitative insights from your users." |
| 5 | +--- |
| 6 | + |
| 7 | +Sentry's [User Feedback Widget](/product/user-feedback/) is a powerful tool for capturing qualitative insights from real users, and is especially valuable during the rollout of new or beta features. Alternatively, it can be used to collect feedback from your fellow team members during an internal release. |
| 8 | + |
| 9 | +Treat user feedback as a core signal in product development, especially for betas and early adopter programs. We recommend you integrate feedback review into planning, stand-ups, or retros; then you can use feedback trends to inform product direction and roadmap decisions. |
| 10 | + |
| 11 | +This 4-step guide will walk you through implementing and instrumenting User Feedback on your application. |
| 12 | + |
| 13 | +## 1. Embed the Widget Contextually |
| 14 | +Bring the widget to the user; don't make them go find it. |
| 15 | + |
| 16 | +Embed the feedback widget directly into experimental or high-impact feature areas. For example, on your checkout screen: |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | +One approach you can take is using thumbs up/down buttons placed contextually within the feature that will trigger the feedback form to open. You can track whether a user clicked on the 👍 or 👎 for each feedback with [custom tags](/platforms/javascript/enriching-events/tags/). The tag will appear on the User Feedback Details page, and optionally on the feedback alert itself after feedback is submitted. |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +<details> |
| 26 | +<summary>**See Example JavaScript Code Snippet**</summary> |
| 27 | + |
| 28 | +```javascript |
| 29 | +"use client"; |
| 30 | + |
| 31 | +import * as Sentry from "@sentry/react"; |
| 32 | +import { Fragment } from "react"; |
| 33 | + |
| 34 | +export default function ThumbsUpDownButtons({source}: {source: string) { |
| 35 | + const feedback = Sentry.getFeedback(); |
| 36 | + |
| 37 | + return ( |
| 38 | + <Fragment> |
| 39 | + <strong>Was this helpful?</strong> |
| 40 | + <button |
| 41 | + title="I like this" |
| 42 | + onClick={async () =>{ |
| 43 | + const form = await feedback?.createForm({ |
| 44 | + messagePlaceholder: 'What did you like most?', |
| 45 | + tags: { |
| 46 | + component: 'ThumbsUpDownButtons', |
| 47 | + 'feedback.source': source, |
| 48 | + 'feedback.type': 'positive', |
| 49 | + } |
| 50 | + }); |
| 51 | + form?.appendToDom(); |
| 52 | + form?.open(); |
| 53 | + }} |
| 54 | + > |
| 55 | + Yes 👍 |
| 56 | + </button> |
| 57 | + |
| 58 | + <button |
| 59 | + title="I don't like this" |
| 60 | + onClick={async () =>{ |
| 61 | + const form = await feedback?.createForm({ |
| 62 | + messagePlaceholder: 'How can we improve?', |
| 63 | + tags: { |
| 64 | + component: 'ThumbsUpDownButtons', |
| 65 | + 'feedback.source': source, |
| 66 | + 'feedback.type': 'negative', |
| 67 | + } |
| 68 | + }); |
| 69 | + form?.appendToDom(); |
| 70 | + form?.open(); |
| 71 | + }} |
| 72 | + > |
| 73 | + No 👎 |
| 74 | + </button> |
| 75 | + </Fragment> |
| 76 | + ); |
| 77 | +} |
| 78 | +``` |
| 79 | +
|
| 80 | +</details> |
| 81 | +
|
| 82 | +
|
| 83 | +
|
| 84 | +## 2. Customize Placeholder Text |
| 85 | +Personalized prompts lead to better feedback. Tailor the placeholder text to the feature’s context. |
| 86 | +
|
| 87 | +
|
| 88 | +Here are examples of placeholder text to guide users: |
| 89 | +
|
| 90 | +> How was your experience with [your feature's name]? |
| 91 | +
|
| 92 | +> How can we make your experience better? |
| 93 | +
|
| 94 | +> We're still building out [your feature's name] - how can we make it better? |
| 95 | +
|
| 96 | +
|
| 97 | +
|
| 98 | +It's best to customize your prompts for clarity and relevance; this will guide the user to provide useful input. Use friendly language to encourage honest, casual feedback. |
| 99 | +
|
| 100 | +
|
| 101 | +## 3. Add Custom Tags to Feedback Submissions For Better Routing |
| 102 | +
|
| 103 | +If you have multiple feedback buttons in your application that are embedded into different features, tags are critical in order to enable faster alert routing and triaging for the right teams. |
| 104 | +
|
| 105 | +You can auto-apply tags based on the widget’s placement. For example, use a custom tag like `feedback.source:checkout`. This allows for routing in Slack and filtering in dashboards. We recommend you define and standardize tags using a single key, such as `feedback.source`. |
| 106 | +
|
| 107 | +
|
| 108 | +## 4. Set Up Alerts to Relevant Channels |
| 109 | +Feedback is only useful if seen by the right folks. |
| 110 | +
|
| 111 | +You can send User Feedback directly into the appropriate team’s channel—whether you use Slack, Microsoft Teams, or Discord (see [complete list of integrations](/product/alerts/create-alerts/routing-alerts/#integrations)). For example, you can tag feedback `feedback.source:checkout` and always have it go to your `#proj-billing` channel in Slack. With this workflow, engineers see feedback in near-real time and take ownership. |
| 112 | +
|
| 113 | +Follow the steps below to set up feedback alerts to relevant channels: |
| 114 | +
|
| 115 | +1. Create a [New Alert Rule](https://sentry.io/alerts/new/issue/) in Sentry. |
| 116 | +2. Scroll to the "Set conditions" section and set the "IF" filter to `The issue's category is equal to… "Feedback"` and `The event's tags match... [your custom tag]`. |
| 117 | +3. In the “THEN” filter, select `Send a [your integration] notification` and then add details of the channel you'd like to send the feedback to. You can also add tags you’d like to see on the feedback alert. For example, `user.email`. |
| 118 | +4. Add an alert name and owner. |
| 119 | +
|
| 120 | +
|
| 121 | + |
| 122 | +
|
| 123 | +Once set up, here's what an example alert looks like: |
| 124 | +
|
| 125 | + |
| 126 | +
|
| 127 | +
|
| 128 | +
|
| 129 | +<PageGrid /> |
0 commit comments