Skip to content

Commit 208d85b

Browse files
ryan953michellewzhang
authored andcommitted
docs(feedback): Update docs for onSubmitSuccess to include eventID (#14310)
Also added a note for how to use `eventID` to link back to sentry.io <img width="815" alt="SCR-20250709-ntqc" src="https://github.com/user-attachments/assets/55bfa501-416d-4a52-a5fc-1baa655bbf2c" /> Related to getsentry/sentry-javascript#16835 Related to getsentry/sentry-javascript#16836 --------- Co-authored-by: Michelle Zhang <[email protected]>
1 parent 7ad6112 commit 208d85b

File tree

1 file changed

+5
-1
lines changed
  • docs/platforms/javascript/common/user-feedback/configuration

1 file changed

+5
-1
lines changed

docs/platforms/javascript/common/user-feedback/configuration/index.mdx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,17 @@ Sentry.init({
239239
Sentry.feedbackIntegration({
240240
onFormOpen: () => {},
241241
onFormClose: () => {},
242-
onSubmitSuccess: (data: FeedbackFormData) => {},
242+
onSubmitSuccess: (data: FeedbackFormData, eventID: string) => {},
243243
onSubmitError: (error: Error) => {},
244244
}),
245245
],
246246
});
247247
```
248248

249+
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}`.
250+
251+
*Note:* In v9 and below of the SDK, the signature of `onSubmitSuccess` was `(data: FeedbackFormData) => {}`.
252+
249253
### Bring Your Own Button
250254

251255
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).

0 commit comments

Comments
 (0)