Skip to content
Merged
Changes from 2 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
27 changes: 18 additions & 9 deletions platform-includes/user-feedback/install/javascript.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
The User Feedback integration is **already included** in your browser or framework SDK NPM packages. If you're using CDN bundles instead of NPM packages, you need to load the User Feedback integration CDN bundle in addition to your browser bundle:
The User Feedback integration is **already included** in your NPM packages. You don't need to install anything else to use it.

```bash {tabTitle:npm}
npm install @sentry/browser --save
```
If you're using the Loader Script, you can lazy load the User Feedback integration like this:

```bash {tabTitle:yarn}
yarn add @sentry/browser
```
```javascript {tabTitle: Loader}
window.sentryOnLoad = function () {
Sentry.init({
// add other configuration here
});

```bash {tabTitle:pnpm}
pnpm add @sentry/browser
Sentry.lazyLoadIntegration("feedbackIntegration")
.then((feedbackIntegration) => {
Sentry.addIntegration(feedbackIntegration());
})
.catch(() => {
// this can happen if e.g. a network error occurs,
// in this case User Feedback will not be enabled
});
};
```

If you're using CDN bundles instead of NPM packages, you need to load the User Feedback integration CDN bundle in addition to your browser bundle:
Copy link
Member

Choose a reason for hiding this comment

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

"in addition" seems like it should go away. People should pick one CDN script with the combination of integrations that they want to have.

Copy link
Member Author

Choose a reason for hiding this comment

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

yeah, good point, we call this out in the snippet anyhow!


```html {tabTitle: CDN}
<!-- Recommended: Use this bundle for feedback, replay, error, and tracing -->
<script
Expand Down
Loading