Capturing Feedback
UsecaptureFeedback() to send user feedback to Sentry:
Feedback appears in Sentry as a special event type that can be viewed alongside errors and performance data.
Feedback Parameters
Required Fields
Optional Fields
Associating with Errors
Link feedback to specific error events:User Feedback Widget
Sentry provides a pre-built feedback widget:Widget Configuration
Programmatic Control
Custom Feedback UI
Build your own feedback UI:Feedback on Errors
Automatically prompt for feedback when errors occur:Feedback with Context
Include additional context with feedback:Screenshot with Feedback
Capture screenshots with feedback:Screenshots are stored as attachments and visible in the Sentry UI alongside the feedback.
Practical Examples
E-commerce Checkout
Feature Feedback
Support Ticket Creation
Viewing Feedback
Feedback appears in Sentry:- Feedback Tab: View all feedback
- Issues: Feedback linked to errors
- User Details: All feedback from a specific user
- User contact information
- Message content
- Associated error (if linked)
- Page URL
- Browser/device info
- Tags and context
- Replay (if available)
Best Practices
- Make it easy: Low-friction feedback collection
- Provide context: Include page URL and error details
- Respect privacy: Don’t require personal info
- Close the loop: Respond to feedback
- Link to errors: Associate feedback with specific issues
- Use appropriate timing: Don’t interrupt critical flows
- Thank users: Show appreciation for feedback
Privacy Considerations
Next Steps
Error Monitoring
Link feedback to error events
Session Replay
Include replays with feedback
Context
Add context to feedback
Scopes
Manage feedback scope data