---
title: "Loader Script"
description: "Learn about the Sentry JavaScript Loader Script"
url: https://docs.sentry.io/platforms/javascript/install/loader/
---
# Loader Script | Sentry for JavaScript
The Loader Script is the easiest way to initialize the Sentry SDK. The Loader Script also automatically keeps your Sentry SDK up to date and offers configuration for different Sentry features.
## [Using the Loader](https://docs.sentry.io/platforms/javascript/install/loader.md#using-the-loader)
To use the loader, go in the Sentry UI to **Settings > Projects > (select project) > SDK Setup > Loader Script**. Copy the script tag and include it as the first script on your page. By including it first, you allow it to catch and buffer events from any subsequent scripts, while still ensuring the full SDK doesn't load until after everything else has run.
```html
```
By default, Tracing and Session Replay are disabled.
## [Source Maps](https://docs.sentry.io/platforms/javascript/install/loader.md#source-maps)
To have correct stack traces for minified asset files when using the Loader Script, you will have to either [host your Source Maps publicly](https://docs.sentry.io/platforms/javascript/sourcemaps/uploading/hosting-publicly.md) or [upload them to Sentry](https://docs.sentry.io/platforms/javascript/sourcemaps.md).
## [Loader Configuration](https://docs.sentry.io/platforms/javascript/install/loader.md#loader-configuration)
The loader has a few configuration options:
* What version of the SDK to load
* Using Tracing
* Using Session Replay
* Enabling SDK debugging
### [SDK Version](https://docs.sentry.io/platforms/javascript/install/loader.md#sdk-version)
To configure the version, use the dropdown in the "Loader Script" settings, directly beneath the script tag you copied earlier.
Note that because of caching, it can take a few minutes for version changes made here to take effect.
### [Load Timing](https://docs.sentry.io/platforms/javascript/install/loader.md#load-timing)
If you only use the Loader for errors, the loader won't load the full SDK until triggered by one of the following:
* an unhandled error
* an unhandled promise rejection
* a call to `Sentry.captureException`
* a call to `Sentry.captureMessage`
* a call to `Sentry.captureEvent`
Once one of those occurs, the loader will buffer that event and immediately request the full SDK from our CDN. Any events that occur between that request being made and the completion of SDK initialization will also be buffered, and all buffered events will be sent to Sentry once the SDK is fully initialized.
Alternatively, you can set the loader to request the full SDK earlier: still as part of page load, but *after* all of the other JavaScript on the page has run. (In other words, in a subsequent event loop.) To do this, include `data-lazy="no"` in your script tag.
```html
```
Finally, if you want to control the timing yourself, you can call `Sentry.forceLoad()`. You can do this as early as immediately after the loader runs (which has the same effect as setting `data-lazy="no"`) and as late as the first unhandled error, unhandled promise rejection, or call to `Sentry.captureMessage` or `Sentry.captureEvent` (which has the same effect as not calling it at all). Note that you can't delay loading past one of the aforementioned triggering events.
If Tracing and/or Session Replay is enabled, the SDK will immediately fetch and initialize the bundle to make sure it can capture transactions and/or replays once the page loads.
## [SDK Configuration](https://docs.sentry.io/platforms/javascript/install/loader.md#sdk-configuration)
While the Loader Script will work out of the box without any configuration in your application, you can still configure the SDK according to your needs.
### [Default Configuration](https://docs.sentry.io/platforms/javascript/install/loader.md#default-configuration)
For Tracing, the SDK will be initialized with `tracesSampleRate: 1` by default. This means that the SDK will capture all traces.
For Session Replay, the defaults are `replaysSessionSampleRate: 0.1` and `replaysOnErrorSampleRate: 1`. This means Replays will be captured for 10% of all normal sessions and for all sessions with an error.
### [Release Configuration](https://docs.sentry.io/platforms/javascript/install/loader.md#release-configuration)
You can configure the release by adding the following to your page:
```html
```
### [Custom Configuration](https://docs.sentry.io/platforms/javascript/install/loader.md#custom-configuration)
The loader script always includes a call to `Sentry.init` with a default configuration, including your DSN. If you want to [configure your SDK](https://docs.sentry.io/platforms/javascript/configuration/options.md) beyond that, you can configure a custom init call by defining a `window.sentryOnLoad` function. Whatever is defined inside of this function will *always* be called first, before any other SDK method is called.
**Be sure to define this function *before* you add the loader script, to ensure it can be called at the right time:**
```html
```
Inside of the `window.sentryOnLoad` function, you can configure a custom `Sentry.init()` call. You can configure your SDK exactly the way you would if you were using the CDN, with one difference: your `Sentry.init()` call doesn't need to include your DSN, since it's already been set. Inside of this function, the full Sentry SDK is guaranteed to be loaded & available.
```html
```
### [Guarding SDK Function Calls](https://docs.sentry.io/platforms/javascript/install/loader.md#guarding-sdk-function-calls)
By default, the loader will make sure you can call these functions directly on `Sentry` at any time, even if the SDK is not yet loaded:
* `Sentry.captureException()`
* `Sentry.captureMessage()`
* `Sentry.captureEvent()`
* `Sentry.addBreadcrumb()`
* `Sentry.withScope()`
* `Sentry.showReportDialog()`
If you want to call any other method when using the Loader, you have to guard it with `Sentry.onLoad()`. Any callback given to `onLoad()` will be called either immediately (if the SDK is already loaded), or later once the SDK has been loaded:
```html
```
## [Limitations of Errors-only Capturing](https://docs.sentry.io/platforms/javascript/install/loader.md#limitations-of-errors-only-capturing)
When using the Loader Script with just errors, the script injects the SDK asynchronously. This means that only *unhandled errors* and *unhandled promise rejections* will be caught and buffered before the SDK is fully loaded. Specifically, capturing [breadcrumb data](https://docs.sentry.io/platforms/javascript/enriching-events/breadcrumbs.md) will not be available until the SDK is fully loaded and initialized. To reduce the amount of time these features are unavailable, set `data-lazy="no"` or call `forceLoad()` as described above.
If you want to understand the inner workings of the loader itself, you can read the documented source code in all its glory over at the [Sentry repository](https://github.com/getsentry/sentry/blob/master/src/sentry/templates/sentry/js-sdk-loader.ts).
## [Limitations of Tracing](https://docs.sentry.io/platforms/javascript/install/loader.md#limitations-of-tracing)
Because the loader script injects the actual SDK asynchronously to keep your pageload performance high, the SDK's tracing functionality is only available once the SDK is loaded and initialized. This means that if you e.g. have `fetch` calls right at the beginning of your application, they might not be traced. If this is a critical issue for you, you have two options to ensure that all your `fetch` calls are traced:
* Initialize the SDK in `window.sentryOnLoad` as described in [Custom Configuration](https://docs.sentry.io/platforms/javascript/install/loader.md#custom-configuration). Then make your `fetch` call in the `Sentry.onload` callback.
Example
```html
```
* Use the [CDN bundles](https://docs.sentry.io/platforms/javascript/install/loader.md#cdn) instead of the Loader Script. This will ensure that the SDK is loaded synchronously, and that all your `fetch` calls are traced.
Please be aware that both of these options will add delay to your `fetch` calls or decrease your pageload performance. Ultimately, this is the trade-off between lazy and eagerly loading the Sentry SDK.
## [CDN](https://docs.sentry.io/platforms/javascript/install/loader.md#cdn)
Sentry supports loading the JavaScript SDK from a CDN. Generally we suggest using our Loader instead. If you *must* use a CDN, see [Available Bundles](https://docs.sentry.io/platforms/javascript/install/loader.md#available-bundles) below.
## [Performance Bundle](https://docs.sentry.io/platforms/javascript/install/loader.md#performance-bundle)
To use Sentry for error and tracing, you can use the following bundle:
```html
```
## [Performance & Replay Bundle](https://docs.sentry.io/platforms/javascript/install/loader.md#performance--replay-bundle)
To use Sentry for error and tracing, as well as for [Session Replay](https://docs.sentry.io/platforms/javascript/session-replay.md), you can use the following bundle:
```html
```
## [Errors & Replay Bundle](https://docs.sentry.io/platforms/javascript/install/loader.md#errors--replay-bundle)
To use Sentry for error monitoring, as well as for [Session Replay](https://docs.sentry.io/platforms/javascript/session-replay.md), but **not for tracing**, you can use the following bundle:
```html
```
## [Errors-only Bundle](https://docs.sentry.io/platforms/javascript/install/loader.md#errors-only-bundle)
If you only use Sentry for error monitoring, you can use the following bundle:
```html
```
## [Logs & Metrics Bundle](https://docs.sentry.io/platforms/javascript/install/loader.md#logs--metrics-bundle)
To use Sentry for error monitoring, logs, and metrics, you can use the following bundle:
```html
```
## [Performance, Replay & Feedback Bundle](https://docs.sentry.io/platforms/javascript/install/loader.md#performance-replay--feedback-bundle)
To use Sentry for error monitoring, tracing, [Session Replay](https://docs.sentry.io/platforms/javascript/session-replay.md), and [User Feedback](https://docs.sentry.io/platforms/javascript/user-feedback.md), you can use the following bundle:
```html
```
## [Replay & Feedback Bundle](https://docs.sentry.io/platforms/javascript/install/loader.md#replay--feedback-bundle)
To use Sentry for error monitoring, [Session Replay](https://docs.sentry.io/platforms/javascript/session-replay.md), and [User Feedback](https://docs.sentry.io/platforms/javascript/user-feedback.md), you can use the following bundle:
```html
```
## [Performance, Logs & Metrics Bundle](https://docs.sentry.io/platforms/javascript/install/loader.md#performance-logs--metrics-bundle)
To use Sentry for error monitoring, tracing, logs, and metrics, you can use the following bundle:
```html
```
## [Replay, Logs & Metrics Bundle](https://docs.sentry.io/platforms/javascript/install/loader.md#replay-logs--metrics-bundle)
To use Sentry for error monitoring, [Session Replay](https://docs.sentry.io/platforms/javascript/session-replay.md), logs, and metrics, you can use the following bundle:
```html
```
## [Performance, Replay, Logs & Metrics Bundle](https://docs.sentry.io/platforms/javascript/install/loader.md#performance-replay-logs--metrics-bundle)
To use Sentry for error monitoring, tracing, [Session Replay](https://docs.sentry.io/platforms/javascript/session-replay.md), logs, and metrics, you can use the following bundle:
```html
```
## [Full Bundle with All Features](https://docs.sentry.io/platforms/javascript/install/loader.md#full-bundle-with-all-features)
To use all Sentry features including error monitoring, tracing, [Session Replay](https://docs.sentry.io/platforms/javascript/session-replay.md), [User Feedback](https://docs.sentry.io/platforms/javascript/user-feedback.md), logs, and metrics, you can use the following bundle:
```html
```
## [Usage & Configuration](https://docs.sentry.io/platforms/javascript/install/loader.md#usage--configuration)
Once you've included the Sentry SDK bundle in your page, you can use Sentry in your own bundle:
```javascript
Sentry.init({
dsn: "___PUBLIC_DSN___",
// this assumes your build process replaces `process.env.npm_package_version` with a value
release: "my-project-name@" + process.env.npm_package_version,
integrations: [
// If you use a bundle with tracing enabled, add the BrowserTracing integration
Sentry.browserTracingIntegration(),
// If you use a bundle with session replay enabled, add the Replay integration
Sentry.replayIntegration(),
],
// We recommend adjusting this value in production, or using tracesSampler
// for finer control
tracesSampleRate: 1.0,
// Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
});
```
## [Available Bundles](https://docs.sentry.io/platforms/javascript/install/loader.md#available-bundles)
Our CDN hosts a variety of bundles:
* `bundle..js` - Base bundle with error monitoring only
* `bundle.tracing..js` - Error monitoring and tracing
* `bundle.replay..js` - Error monitoring and session replay
* `bundle.feedback..js` - Error monitoring and user feedback
* `bundle.tracing.replay..js` - Error monitoring, tracing, and session replay
* `bundle.replay.feedback..js` - Error monitoring, session replay, and user feedback
* `bundle.tracing.replay.feedback..js` - Error monitoring, tracing, session replay, and user feedback
* `bundle.logs.metrics..js` - Error monitoring, logs, and metrics
* `bundle.replay.logs.metrics..js` - Error monitoring, session replay, logs, and metrics
* `bundle.tracing.logs.metrics..js` - Error monitoring, tracing, logs, and metrics
* `bundle.tracing.replay.logs.metrics..js` - Error monitoring, tracing, session replay, logs, and metrics
* `bundle.tracing.replay.feedback.logs.metrics..js` - Error monitoring, tracing, session replay, feedback, logs, and metrics
Additionally, each of the integrations in `@sentry/integrations` is available as a bundle named `..js`.
Since v8 of the SDK, the bundles are ES6 by default. If you need ES5 support, make sure to add a polyfill for ES5 features yourself. Alternatively, you can use the v7 bundles and add the `.es5` modifier.
Each version has three bundle varieties:
* minified (`.min`)
* unminified (no `.min`), includes debug logging
* minified with debug logging (`.debug.min`)
Bundles that include debug logging output more detailed log messages, which can be helpful for debugging problems. Make sure to [enable debug](https://docs.sentry.io/platforms/javascript/configuration/options.md#debug) to see debug messages in the console. Unminified and debug logging bundles have a greater bundle size than minified ones.
For example:
* `bundle.js` is `@sentry/browser`, compiled to ES6 but not minified, with debug logging included (as it is for all unminified bundles)
* `bundle.tracing.debug.min.js` is `@sentry/browser` with tracing enabled, minified, with sdk debug logging included
| File | Integrity Checksum |
| -------------------------------------------------------- | ------------------------------------------------------------------------- |
| browserprofiling.debug.min.js | `sha384-hvZYqhEUx1tTvimV5AUCWRttKiUZd0UMSF1joXRG+touImblGaA6Fx6DnhV16jmO` |
| browserprofiling.js | `sha384-zTU87EGx3UhgLYViBs5T4cIZfGvJxdMyF2VmLS9hGGbinUxyd5dthkvrFFrgXa0i` |
| browserprofiling.min.js | `sha384-FINDUPobd+6oqby1Knp82RSU1wrY8C+U3OBlo54BK9Is2Ny3kyR6E23BEvUibckQ` |
| bundle.debug.min.js | `sha384-fIZyTqg9f+8FNNXt9VWEzrHdmM3q/W3KlSxVUGEoJtti2U84BHWCZ3Bd5cIx5sYx` |
| bundle.feedback.debug.min.js | `sha384-mKA0ycnGMblaUnp1YWcN56et+zGkIak9F788zwcOcHRUu3uZjNyBdZnNBaCjaN00` |
| bundle.feedback.js | `sha384-Aq92QhHv9rE+M051U6edWSJNrs0Zp4gAfpNjezn0ZLWol+jmkn/RhJGLMdSslrBU` |
| bundle.feedback.min.js | `sha384-Oa2vAaolC6Y+peKckXNTNDApp7HOf9Sj8ai6Wb0EBtjx5evAL3VDCt7FLyGWFk+3` |
| bundle.js | `sha384-SNJraly5/Vrf2QLlj296/FVvc15YT8Arbe9i4lPmB32fhT9i9gDYRFrX3760gVtE` |
| bundle.logs.metrics.debug.min.js | `sha384-Gi70DvFJml6kZVt0V75C9s24IlaJcm9fG5jkiWVTBCMfc/FsAcYqhhNMAv3JYx0Q` |
| bundle.logs.metrics.js | `sha384-VaIcTTiRhuCZRHz1CCfmd1YBHN53Kj3c7TbrJOOkC/TvnrXJs+prbIaa0gwrPxmg` |
| bundle.logs.metrics.min.js | `sha384-XDDjklPw6PeJ59fwomZP9wOa7Z3HwWnJ8DGuBtqjYeh0PTPu3AIstpH6lnfWnI0P` |
| bundle.min.js | `sha384-sx+UyjbtMU5ociD00tpUP0LC8A78wmbbIzMUl3+Y35sUqIweqvkXE43dDRqQDEO8` |
| bundle.replay.debug.min.js | `sha384-o4Mw0TUfU0Xxp+hSO3c0wxC7JG92feArxU7vErwO41JJryjg380j55WQeiiSLWZl` |
| bundle.replay.feedback.debug.min.js | `sha384-ovpIkUYmSi5D5TCCgzUOztwATwoTsmG21WWnhtBu7w3NEx0TUJqAad3CLfSTxlgp` |
| bundle.replay.feedback.js | `sha384-wyNV/1Wo6UZjaQ0ibSETjF8d1hMqQZ+kghucw/6JLK1StePLtnfkrsj+9jNDpxq9` |
| bundle.replay.feedback.min.js | `sha384-Q45P/Sqzswqlj4KZjVcmzGl/IzfAIwlJx+vRFrTLryfocA6Q9pacN9fRNXjjnyB5` |
| bundle.replay.js | `sha384-lwULqoxPBYgg9WyswlYRZ5zGXJuYs2CIIEpp14YSRvtThD5zEJftEhBfzU4tWYoY` |
| bundle.replay.logs.metrics.debug.min.js | `sha384-cUJRFCQhVeU/2Q25QohDt7rXz/Znl8M/phq2XbDWkgZrQ/fWWkCmp3pk1daSEcp9` |
| bundle.replay.logs.metrics.js | `sha384-Of4+ui8LEI4O0BfMKHUAUKIRJkRODFPTGKXsPTz1aYKP28w1UTh/9sbN56Emaig0` |
| bundle.replay.logs.metrics.min.js | `sha384-YDUGqaJS1Kg5zAbyhzZajghUW0/iyuq+fCRawj78ypYUotU3OhjHt/8vvdgpYC/e` |
| bundle.replay.min.js | `sha384-fTrnFPzT7dGeZKFslz85++Nhy00aFIvEiAMwDJQRRFADCW4Lg3bhRxdWtAAPAW8z` |
| bundle.tracing.debug.min.js | `sha384-RCvCRAqAeoRPmgTMwwy14eND2DxgPy+oq8JIUtlxYn5WH3O60h8JhbqTqOvWk4Ir` |
| bundle.tracing.js | `sha384-HFVXsa29OUSRqa79i7xW7h8tc6R7leZBWi/gQ/XHx2XyOyavGFWtEQaC3tsFLXrk` |
| bundle.tracing.logs.metrics.debug.min.js | `sha384-puwIWBrU+W+jINo8QB8cY1ILwB67YfYstfAoRft3/5q1AYIYMe8aLXoOkPWahXlD` |
| bundle.tracing.logs.metrics.js | `sha384-+Fqtye9+4cWe8NToBl0KaDwxqTeUlkzA/cPVJccb1OpHPVYFA5Ad8EooE2r6zeVv` |
| bundle.tracing.logs.metrics.min.js | `sha384-0E6BxRgtAhkeI8W0SIk9gbpMk9pSHG2DAoItKRoNbNLBZnidLpTIdteV2hXFWdQJ` |
| bundle.tracing.min.js | `sha384-OZ5Z+nduJgfrgKJ0+ia/MgAWmzf62loRVSoqSByu8KXNnfsPrmOB3+gnfH85iJLz` |
| bundle.tracing.replay.debug.min.js | `sha384-Xl5l+WXWCNIEKHoQcM2q4rD7nOcCDk1HPxhXScFQ6/78RWppcXPW1WUsAhAEiH3x` |
| bundle.tracing.replay.feedback.debug.min.js | `sha384-0ODIvumV82emesY8xsOXZVGbq5eCPogUvMN15OQBcyr/wthxhc0KCXew6B8q9tmb` |
| bundle.tracing.replay.feedback.js | `sha384-RF42E2Wrl+0XgpaBsaIo9YJOZbAt2jCV58C5j0eenFaKvo+yh94N5y4bw4u9oW7t` |
| bundle.tracing.replay.feedback.logs.metrics.debug.min.js | `sha384-aeHvvrl35JaMqE8U0Jg8GWPZhkbfeMvpUZgcmzkswW8kxDT/bhYSEiPCQjG8x5I9` |
| bundle.tracing.replay.feedback.logs.metrics.js | `sha384-8MR7j1HKpFnYUx5v9RJAu4y3cARNWkil9zeaKEd0/sUCB6JSrhWyqWJxi+rUldF5` |
| bundle.tracing.replay.feedback.logs.metrics.min.js | `sha384-Vrl48rzQZwUltKt/MDKGqPoAEKjX5ZSQIaLIpQbslteopFKJ7t/Kk3tdX8s3y9F0` |
| bundle.tracing.replay.feedback.min.js | `sha384-G3+FkVYCGDpkRI1/yFocVhmtXKI7gEpcgQteozuhln3cnq3COd2oBkzLJH6iK985` |
| bundle.tracing.replay.js | `sha384-t3/Z1ZGh+TuBOCvwCsbqhFzbE+E2I+Z+iICngi2X4KRevumbLBFIggnlzowVjR3k` |
| bundle.tracing.replay.logs.metrics.debug.min.js | `sha384-2YhKOiwFzwqc+TTvKq1zeaJtvwEL8q3ghnvjNreJoM0fRMsOIy63GD/l2MSzo2hR` |
| bundle.tracing.replay.logs.metrics.js | `sha384-pUuS+QLp+9Vj7lt9TaLVj1U24rx+aNVG/0fn/WYHtH55f7kDunCO2bsFas56sMfl` |
| bundle.tracing.replay.logs.metrics.min.js | `sha384-nrFItLWQUl211ngbeXiwzTNZ7hT+VD3FFI83Puj6pPdjGaLilu9e4FHOu2uEugFb` |
| bundle.tracing.replay.min.js | `sha384-fQ6+h9MWvYSQRQnhB4cqySu1euvq0IHsM2YvUgqhuK0q2/qsSSvJk3nX1PIhriU8` |
| captureconsole.debug.min.js | `sha384-IJQnROT58lYaWlycKGLTq1EV3DEZVHIsEDs3T0OwDiuPT0qci4zLBh1zABDLBiw/` |
| captureconsole.js | `sha384-BYybic3sB3Q0Te/YgEDxW5Z++YkMi51z94SQj8toWPKkvAHNA4dpY04Ny8wvVFI7` |
| captureconsole.min.js | `sha384-Mdo5sFAnAIru/r/lFXw0xGSBO57wPwCtkzOZVOq2hybbfVL5o0JMCJ7yOiK3qRVL` |
| contextlines.debug.min.js | `sha384-dlzoRetpO0VwzM46ashHqupwglJ/tPZGL8JdSj6RNNJY6kDPwTB4EOw6EW1TawXR` |
| contextlines.js | `sha384-LuPAYzM/cLKrn7sxeGqzWugk5mmogLed3Q0ZDVdoWluBfTBuYOSQKfEH7osUvNUZ` |
| contextlines.min.js | `sha384-WSY51sWQG920KQtagdFmOY2LH4f+NQym9SvxamGDkpo/8GntcndRxXxIepkPt+Ld` |
| createlangchaincallbackhandler.debug.min.js | `sha384-X/iHZ8pnfbSGv1t5VUZ9xcBGg2gxtGGI2wAF99jiy5y1J3VRvmKqfV8CktJ6G408` |
| createlangchaincallbackhandler.js | `sha384-wcNVnVFa6RNU4WUEa0sGoQGzQ9232CAj65MBK+/hXleNeKblU60MYl2Ih9xFahaw` |
| createlangchaincallbackhandler.min.js | `sha384-SolctBQNykPD51paA5MO8LZF6+zQGNI69zdGa1yAngDOg0J3PIX79q7TfYVx1vMq` |
| dedupe.debug.min.js | `sha384-4SQ+5KGb7UPU2dhVXkeEB/MV+2Mh7CQWiU+It3+c8R50mxzEq/YuHWkFJIX4xXuz` |
| dedupe.js | `sha384-Ud/5BPqzj/iNVnZTEK3obcshnGPaFFdWkrKnSRexCzJkgowMgrt0zcRMxwnBXZK1` |
| dedupe.min.js | `sha384-LCaBF3jhquZpPkDx0oA1EFJDXF3VzIVa5MIS/v4E3197R0NR0S3UQjwRsDLSBRwb` |
| extraerrordata.debug.min.js | `sha384-mXfxsx7pab9LdSOEMXoIgrwescKjgbgpKvXrmwbbI7A1DizTsJJE442/LaVpNrKc` |
| extraerrordata.js | `sha384-bfWJzaE9784qFwr+42hETmv8Um3UG+hT54Md7aP+qjU8nBAs3N6jR08cz+6QbNOA` |
| extraerrordata.min.js | `sha384-9PdXJQnomZdSX21UZHq0C3uFApgOBa6AwI1SPp8caA8p6hN/ibn/oy1BNfyzw1uV` |
| feedback-modal.debug.min.js | `sha384-4M6d4GT/fFCr2hrqicY/Y1zZsX9XHxPPX3R5B5P20hLouuK/vkM7e2GHinR8IhXk` |
| feedback-modal.js | `sha384-j+pVb0TW7JDeFr8geGMrZDle0/gZrPodpxKwTBhupHSF3yyMSIh5TCDiXZ3jyYNX` |
| feedback-modal.min.js | `sha384-zU6umDr7Al0k3QudbS4fxEVPOHXAebbljrBwI146Tsu2nOgJm/tGQ4+NSkYAYl4j` |
| feedback-screenshot.debug.min.js | `sha384-HC0oXX5z0MPqazbameik4JyljVuWEixGwC9uYVbEERx45llm9DypGt2LjGlc1/cm` |
| feedback-screenshot.js | `sha384-F9lG+hAWRzvNhYBcUK8ZaPFbX/vyOOSvY0LOrUmhAFsgTgy4Oj2rf++t0Au7Zre3` |
| feedback-screenshot.min.js | `sha384-etCtHXkfVECw/N8ce4r0NXeY3Z0YYDqcF95L4w8sCPnnOxoi5lArzjikaR14bS44` |
| feedback.debug.min.js | `sha384-QaI5cUqnV4hXQb6VL7YwPNQb2MlRBQa2ErSfT7PUW9zp8z8lM9Zm4bB/BZeHqwi5` |
| feedback.js | `sha384-67InEoMRZnGEwrkEfNhCBI51jaRuXXo2o+L/CMZNJjhHvh1iIzlUIcg99i6D677b` |
| feedback.min.js | `sha384-HCQxsZJ3oBXjMcOT6gLBVwiDsT1a7Pkp/huQbEq8aGlteCiO46TOF99aAm13wHke` |
| graphqlclient.debug.min.js | `sha384-31QHan2y408eWtEcYPIaQp+sekejQYQLsPlU+l5liTzgjMYednvAlxFi8IXTSZmR` |
| graphqlclient.js | `sha384-r4VzLtdb53qclfWuWbfKHjMTFp/1xwe6C4+1YhbNadOrNEYgDo8w2ihiUOcJciK6` |
| graphqlclient.min.js | `sha384-X6e8si1V2lfwirXDQSdKfRjVCJyMTPVIqdxtLmLHk5lc/s8ITouHrhD55/n9251s` |
| httpclient.debug.min.js | `sha384-AVBDFurDmqVbfQOHXO51UJfCutBaan1g7pWOQXU2gXrDbqRC1wKO0zjL0lGVfBNI` |
| httpclient.js | `sha384-thYNX0pdoVyHAgH81f0vxKhbwAqxpTx/Bs/y1MHs/5kyBggbyrqThsLBz1lD7Rii` |
| httpclient.min.js | `sha384-UR7K8xNiXnMvXgJuanzHTq8ZDpzmdtEclgWt5xhUAaIdUnHmqhFkrafJD9mXp4Kh` |
| instrumentanthropicaiclient.debug.min.js | `sha384-q6VlstCt4o4jcWaB2+zYEVTMvAPxKgB7D8OLPaIJ+rtt6HlWV0FE72DhqTwPltA+` |
| instrumentanthropicaiclient.js | `sha384-+xQMysHjfVS3GFan0sYYlIeszF982YIcngcdW+17ivP2/X+irn2kBtS8NPl/DZ7w` |
| instrumentanthropicaiclient.min.js | `sha384-c2R38ODcPJLeu333kZWjzYMCKHlEk3zXmf4QhkSB9aT0zNhqi/WLWuuV/NBVwKzr` |
| instrumentgooglegenaiclient.debug.min.js | `sha384-nGy5Lr+C85QneOfN+d+BliCUKN0VKDVTCsGXt5iHMmNBLgUexsYbbnO/vqJDy2ZT` |
| instrumentgooglegenaiclient.js | `sha384-bGd+bCrBGDksUsfmKr7c6RI8eMtHfZDSZDLvC+ULYfrO9B5yYFZYnL5Jc5Rzc0ZZ` |
| instrumentgooglegenaiclient.min.js | `sha384-OKbMxPuTjsJsJ8n1jXyFiA8DGRDRd72NkslyLuvWvpWU4IkFKZ0adLS75tEs1v2s` |
| instrumentlanggraph.debug.min.js | `sha384-plEcUvnFDW1F7aA+iS4tU7YPRaWLZoIWtul0fIKYK2XCdYQcdkuZ0EJ1ky9rqIbW` |
| instrumentlanggraph.js | `sha384-8DPDArOEvG2Sbv7Uf2BjGkrGbhUbb9fv814JZs+muBqbsfpyczyicj48Cyi+i0xS` |
| instrumentlanggraph.min.js | `sha384-V+MuVa/oH4Vj7varWAsjcrFTK4EM9A3Bv7YNVl2fxA9pzHZfbLkFBdNin2jLr6Or` |
| instrumentopenaiclient.debug.min.js | `sha384-PC3BnxRgXOqhFnN8LVAuVTW5mj0ttBd3b+/QKnrv36500dzszAfBlki75w4MTQoR` |
| instrumentopenaiclient.js | `sha384-vuLHLgdT06d8esvdz8fzgIc4Te0gelEjgymlXj+tOc/gD1CAinN4uNI+bWjROe3U` |
| instrumentopenaiclient.min.js | `sha384-MI+FdfhbNrsI4eoV4QD2zZNfainV2s2hnTMF80DRztxnCcMI0Hi3E0mUuWs2kSpl` |
| modulemetadata.debug.min.js | `sha384-YQodMpt7xP0eD1FDemWHg9KPl7XiWEYFA72tENZEFg2OKrcybDDGx61bWJbI3zBb` |
| modulemetadata.js | `sha384-woB5sDPlwVHKKy8nVKNOuVX6b3kmTPaPWsdSFtUXAGrTmnoDc8ER79j0UGUdEKN7` |
| modulemetadata.min.js | `sha384-bborojMWEkQrtbzk5LSAvV7vIB1Xb8bWw3tg1wkv1mSW9AVoSK0V270Q6WU9np+p` |
| multiplexedtransport.debug.min.js | `sha384-BRmU31Uu45yFE7eu8T/oicxlYWxbbpNr9pMcAhIqEAQqInzoW6Y6AwOT1bFqyIm0` |
| multiplexedtransport.js | `sha384-GxqZgSAdv9u7cdSMW4yz92UfDs8sGBkJOceg4N//PjDr6dFfGyO6tDSqSNUIiJ+x` |
| multiplexedtransport.min.js | `sha384-k6QItQF6M5SsOvIDLDl8DEGx6AnDEXD+sTWsEKVO/wn9l+IpcfeAp1OmQIfGuXFu` |
| replay-canvas.debug.min.js | `sha384-MPQARf2C1v3a27Xgps2kHubqIy/XjIavvIfu/RFe7C7PQINzPNr81SYaX61SMS6F` |
| replay-canvas.js | `sha384-g4TcbkSp/vMzn2mvlO9sSla5I3vaLaCJUqSL6WoLn9b6DdhIsn54Fyol1pxwANu6` |
| replay-canvas.min.js | `sha384-crj/WxtJev8MMyD+0y1j+WSjpWP8MgyopKbwd0VXsdGJj16FzJ/a//hdRdFuEFBM` |
| replay.debug.min.js | `sha384-zq38Yj9x6H6P418E21L4jjXj3y0MnKKghEGS6ns+SxbeKhhjyckBaPv0oN2Jp+QY` |
| replay.js | `sha384-svCUE4LM5aezkHEUYJs+ZwWYGrjc+gvw4ojfBqXKodOs2B3HupSe0UdHtApDGX2J` |
| replay.min.js | `sha384-DQxqkYJaA7quBwGUAWaWDbUxjiJwArb8qNDVEhxUxcW1TgMAcopOmmzoxrlxtyQ1` |
| reportingobserver.debug.min.js | `sha384-3XIt+dYjYPbKWLhZGwU654HS/ybUIzTkoX2ipA+SDZ9s2d04Ca4sGRS4Y+gUlmQu` |
| reportingobserver.js | `sha384-SpFj6hZ3eOHmrpl8j7K3Es8gjkbdVzB6urNTdxcHDbixyaOvr7RrbML/qK3ACePM` |
| reportingobserver.min.js | `sha384-ARArHLUCI2nkMLn6KLfa7QZVmm2utksjVGoaFuTdAg7pMeYp2UlTkpuC2Yi1rqpT` |
| rewriteframes.debug.min.js | `sha384-lAg/fMMG3pLQvU8bDYUTPd0OkiDQhbyBxkKEFEuUqlQOBNHS25sXcA9TIBL+HcRi` |
| rewriteframes.js | `sha384-DVs34yIvvcIxWO+iR3IRHNaCs9ZkP7FsnNLGA6EWsTWTQQPlSyWlUKE2LPUiOum0` |
| rewriteframes.min.js | `sha384-gM1XFh0AVtgO5xZdu6vJEXJJkDZpORKzqxlswF8f6wrJgllZiUYHUkbdxDFR2S5O` |
| spotlight.debug.min.js | `sha384-XYSqFek5/IUzA2sQxis7V2G0RdeBCmztTpML/dDtuoXsfIgPTfDPpOxul7W/7aOy` |
| spotlight.js | `sha384-cL2+U2bN5IGQh1MSR2dL1/YheLNVf8KOIOuQPeNLV3NGpN7CBfCDjcZd0L8AKV4C` |
| spotlight.min.js | `sha384-7kcVkhl8LkzCEO/vuizW7Y/2V0OoiKzmffkGo0qpvzm3FdC8u04OajDzH41QKROx` |
To find the integrity hashes for older SDK versions, you can view our SDK release registry for the Browser SDK [here](https://github.com/getsentry/sentry-release-registry/tree/master/packages/npm/@sentry/browser).
## [Additional Configuration](https://docs.sentry.io/platforms/javascript/install/loader.md#additional-configuration)
### [Using defer](https://docs.sentry.io/platforms/javascript/install/loader.md#using-defer)
If you use the [`defer` script attribute](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-defer), we strongly recommend that you place the script tag for the browser SDK first and mark all of your other scripts with `defer` (but not `async`). This will guarantee that that the Sentry SDK is executed before any of the others.
Without doing this you will find that it's possible for errors to occur before Sentry is loaded, which means you'll be flying blind to those issues.
### [Content Security Policy](https://docs.sentry.io/platforms/javascript/install/loader.md#content-security-policy)
If you have a Content Security Policy (CSP) set up on your site, you will need to add the `script-src` of wherever you're loading the SDK from, and the origin of your DSN. For example:
* `script-src: https://browser.sentry-cdn.com https://js.sentry-cdn.com`
* `connect-src: *.sentry.io`