Skip to content
Merged
Show file tree
Hide file tree
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
@@ -0,0 +1,13 @@
_Requires JS SDK version v7.82.0 or higher._

```html
<script>
Sentry.showReportDialog({
// ...
onClose() {
// Refresh the page after the user closes the report dialog
location.reload();
},
});
</script>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
_Requires JS SDK version v7.82.0 or higher._

```javascript
Sentry.showReportDialog({
// ...
onClose() {
// Refresh the window after the user closes the report dialog
win.reload();
},
});
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
_Requires JS SDK version v7.82.0 or higher._

```javascript
Sentry.showReportDialog({
// ...
onClose() {
// Refresh the page after the user closes the report dialog
location.reload();
},
});
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
_Requires JS SDK version v7.82.0 or higher._

```html
<script>
Sentry.showReportDialog({
// ...
onClose() {
// Refresh the page after the user closes the report dialog
location.reload();
},
});
</script>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
_Requires JS SDK version v7.82.0 or higher._

```html
<script>
Sentry.showReportDialog({
// ...
onClose() {
// Refresh the page after the user closes the report dialog
location.reload();
},
});
</script>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```html
<script>
Sentry.showReportDialog({
// ...
onLoad() {
// Log an event to amplitude when the report dialog opens
amplitude.logEvent("report_dialog_seen");
},
});
</script>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```javascript
Sentry.showReportDialog({
// ...
onLoad() {
// Log an event to amplitude when the report dialog opens
amplitude.logEvent("report_dialog_seen");
},
});
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
```javascript
Sentry.showReportDialog({
// ...
onLoad() {
// Log an event to amplitude when the report dialog opens
amplitude.logEvent("report_dialog_seen");
},
});
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```html
<script>
Sentry.showReportDialog({
// ...
onLoad() {
// Log an event to amplitude when the report dialog opens
amplitude.logEvent("report_dialog_seen");
},
});
</script>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```html
<script>
Sentry.showReportDialog({
// ...
onLoad() {
// Log an event to amplitude when the report dialog opens
amplitude.logEvent("report_dialog_seen");
},
});
</script>
```
18 changes: 16 additions & 2 deletions src/platforms/common/enriching-events/user-feedback.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ While this feature isn't currently supported for Ruby or most of its frameworks,

</PlatformSection>

<PlatformSection supported={["javascript", "java", "apple", "android", "dart", "flutter", "unreal", "react-native", "kotlin-multiplatform"]} >
<PlatformSection supported={["javascript", "java", "apple", "android", "dart", "flutter", "unreal", "react-native", "kotlin-multiplatform"]}>

## User Feedback API

Expand Down Expand Up @@ -110,6 +110,19 @@ An override for Sentry’s automatic language detection (e.g. `lang=de`)
| `errorFormEntry` | Some fields were invalid. Please correct the errors and try again. |
| `successMessage` | Your feedback has been sent. Thank you! |
| `onLoad` | n/a |
| `onClose` | n/a |

<PlatformSection supported={["javascript", "python"]}>

The optional callback `onLoad` will be called when users see the widget. You can use this to run custom logic, for example to log an analytics event:

<PlatformContent includePath="enriching-events/user-feedback/example-widget-onload" />

The optional callback `onClose` will be called when users close the widget. You can use this to run custom logic, for example to reload the page:

<PlatformContent includePath="enriching-events/user-feedback/example-widget-onclose" />

</PlatformSection>

## User Feedback API

Expand Down Expand Up @@ -160,7 +173,8 @@ An override for Sentry’s automatic language detection (e.g. `lang=de`)
| `errorGeneric` | An unknown error occurred while submitting your report. Please try again. |
| `errorFormEntry` | Some fields were invalid. Please correct the errors and try again. |
| `successMessage` | Your feedback has been sent. Thank you! |
| `onLoad` | n/a |
| `onLoad` | n/a - **an optional callback that will be invoked when the widget opens** |
| `onClose` | n/a - **an optional callback that will be invoked when the widget closes** |

## User Feedback API

Expand Down