Skip to content

docs(feedback): Update docs for onSubmitSuccess to include eventID #14310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -239,13 +239,17 @@ Sentry.init({
Sentry.feedbackIntegration({
onFormOpen: () => {},
onFormClose: () => {},
onSubmitSuccess: (data: FeedbackFormData) => {},
onSubmitSuccess: (data: FeedbackFormData, eventID: string) => {},
onSubmitError: (error: Error) => {},
}),
],
});
```

You can link directly to a saved feedback item by implementing the `onSubmitSuccess` callback. The URL you need to construct is `https://\$\{orgSlug}.sentry.io/issues/feedback/?projectSlug=\$\{projectSlug}&eventId=\$\{eventId}`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need the escape chars?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idts

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d'oh

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 autocomplete?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i was trying to make it a different template, which wasn't working. but i didn't clean up all this stuff.


*Note:* In v9 and below of the SDK, the signature of `onSubmitSuccess` was `(data: FeedbackFormData) => {}`.

### Bring Your Own Button

You can use your own button instead of the default injected button to trigger the form being displayed, by calling `feedback.attachTo()` to have the SDK attach a click listener to your button. You can also supply the same customization options that the constructor accepts (for example, for text labels and colors).
Expand Down