---
title: "Configuration"
description: "Learn about general User Feedback configuration fields."
url: https://docs.sentry.io/platforms/javascript/guides/node/user-feedback/configuration/
---

# Configuration | Sentry for Node.js

### [Loading Strategies](https://docs.sentry.io/platforms/javascript/guides/node/user-feedback/configuration.md#loading-strategies)

Because the `feedbackIntegration` is a user-facing integration, we offer two loading strategies that have bundle size implications.

For most users, we recommend using `feedbackIntegration` in your `Sentry.init` call. This will set up user feedback with good defaults, matching the environment.

All of the code examples on this page use `feedbackIntegration` as a default because it's available regardless of whether you've chosen the CDN or NPM installation method. However, the implementation of `feedbackIntegration` is different for the two installation methods. For NPM users, `feedbackIntegration` is an alias of `feedbackSyncIntegration`. For CDN users, `feedbackIntegration` is an alias of `feedbackAsyncIntegration`.

#### [`feedbackSyncIntegration`](https://docs.sentry.io/platforms/javascript/guides/node/user-feedback/configuration.md#feedbacksyncintegration)

If you've installed the SDK with NPM, this loading strategy is used by default. The strategy isn't available if you've installed the SDK via the CDN.

This integration includes all the code needed to render the "Send Feedback" button, as well as the form that is triggered when the button is clicked. Choosing this loading strategy means accepting the largest upfront bundle size in your application. The benefit of this is that the feedback widget is guaranteed to open when the user interacts with it, but in either case, network connectivity is required to send the feedback message.

#### [`feedbackAsyncIntegration`](https://docs.sentry.io/platforms/javascript/guides/node/user-feedback/configuration.md#feedbackasyncintegration)

If you installed the SDK with the CDN, this loading strategy is used by default. If you used NPM, you can still choose to use this loading strategy by adding this integration to your `Sentry.init` call.

This integration includes the minimum amount of code needed upfront to show the "Send Feedback" button on the screen when the page is loaded. When the user clicks on that button, the integration will asynchronously load internal integrations from `https://browser.sentry-cdn.com` that show the form and let the user type out their feedback message. This has the benefit of being the smallest bundle size. The drawback is that asynchronous loading can fail if, for example, the user has an ad-blocker.

#### [When Installed Via CDN](https://docs.sentry.io/platforms/javascript/guides/node/user-feedback/configuration.md#when-installed-via-cdn)

For CDN users `feedbackIntegration` is an alias of `feedbackAsyncIntegration`.

```javascript
import * as Sentry from "@sentry/browser";

Sentry.init({
  dsn: "___PUBLIC_DSN___",
  integrations: [
    // Use the default strategy, an alias for `feedbackAsyncIntegration`
    Sentry.feedbackIntegration({
      // Additional SDK configuration goes in here, for example:
      colorScheme: "system",
    }),
  ],
});
```

#### [When Installed Via NPM](https://docs.sentry.io/platforms/javascript/guides/node/user-feedback/configuration.md#when-installed-via-npm)

For NPM users `feedbackIntegration` is an alias of `feedbackSyncIntegration`.

```javascript
import * as Sentry from "@sentry/browser";

Sentry.init({
  dsn: "___PUBLIC_DSN___",
  integrations: [
    // Use the default strategy, an alias for `feedbackSyncIntegration`
    Sentry.feedbackIntegration({
      // Additional SDK configuration goes in here, for example:
      colorScheme: "system",
    }),
  ],
});
```

## [Crash-Report Modal](https://docs.sentry.io/platforms/javascript/guides/node/user-feedback/configuration.md#crash-report-modal)

You can customize the Crash-Report modal to your organization's needs, for example, for localization purposes. All options can be passed through the `Sentry.showReportDialog` call.

| Param            | Default                                                                                              |
| ---------------- | ---------------------------------------------------------------------------------------------------- |
| `eventId`        | Manually set the id of the event.                                                                    |
| `dsn`            | Manually set dsn to report to.                                                                       |
| `user`           | Manually set user data *\[an object with keys listed below]*.                                        |
| `user.email`     | User's email address.                                                                                |
| `user.name`      | User's name.                                                                                         |
| `lang`           | *\[automatic]* – (**Override for Sentry’s language code.**)                                          |
| `title`          | It looks like we’re having issues.                                                                   |
| `subtitle`       | Our team has been notified.                                                                          |
| `subtitle2`      | If you’d like to help, tell us what happened below. – (**Not visible on small screen resolutions.**) |
| `labelName`      | Name                                                                                                 |
| `labelEmail`     | Email                                                                                                |
| `labelComments`  | What happened?                                                                                       |
| `labelClose`     | Close                                                                                                |
| `labelSubmit`    | Submit                                                                                               |
| `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 - (**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.**)                        |

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:

```javascript
Sentry.showReportDialog({
  // ...
  onLoad() {
    // Log an event to amplitude when the report dialog opens
    amplitude.logEvent("report_dialog_seen");
  },
});
```

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:

*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();
  },
});
```
