-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
fix(js): Fix docs for using feedback with the Loader #12140
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
Changes from 2 commits
a7e881f
225ea89
6c19a16
64fe1c6
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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: | ||
|
||
|
|
||
| ```html {tabTitle: CDN} | ||
| <!-- Recommended: Use this bundle for feedback, replay, error, and tracing --> | ||
| <script | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.