Loader Script for Browser JavaScript

Learn about the Sentry JavaScript Loader Script

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.

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.

Copied
<script
  src="https://___JS_SDK_LOADER_HOST___/___PUBLIC_KEY___.min.js"
  crossorigin="anonymous"
></script>

By default, Tracing and Session Replay are disabled.

To have correct stack traces for minified asset files when using the Loader Script, you will have to either host your Source Maps publicly or upload them to Sentry.

The loader has a few configuration options:

  • What version of the SDK to load
  • Using Tracing
  • Using Session Replay
  • Enabling SDK debugging

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.

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.

Copied
<script
  src="https://___JS_SDK_LOADER_HOST___/___PUBLIC_KEY___.min.js"
  crossorigin="anonymous"
  data-lazy="no"
></script>

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.

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.

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.

You can configure the release by adding the following to your page:

Copied
<script>
  window.SENTRY_RELEASE = {
    id: "...",
  };
</script>

The loader script always includes a call to Sentry.init with a default configuration, including your DSN. If you want to configure your SDK 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:

Copied
<script>
  // Configure sentryOnLoad before adding the Loader Script
  window.sentryOnLoad = function () {
    Sentry.init({
      // add custom config here
    });
  };
</script>

<script
  src="https://___JS_SDK_LOADER_HOST___/___PUBLIC_KEY___.min.js"
  crossorigin="anonymous"
></script>

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.

Copied
<script>
  // Configure sentryOnLoad before adding the Loader Script
  window.sentryOnLoad = function () {
    Sentry.init({
      release: " ... ",
      environment: " ... "
    });
    Sentry.setTag(...);
    // etc.
  };
</script>

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:

Copied
<script>
  window.sentryOnLoad = function () {
    Sentry.init({
      // ...
    });
  };
</script>

<script
  src="https://___JS_SDK_LOADER_HOST___/___PUBLIC_KEY___.min.js"
  crossorigin="anonymous"
></script>

<script>
  // Guard against window.Sentry not being available, e.g. due to Ad-blockers
  window.Sentry &&
    Sentry.onLoad(function () {
      // Inside of this callback,
      // we guarantee that `Sentry` is fully loaded and all APIs are available
      const client = Sentry.getClient();
      // do something custom here
    });
</script>

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 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.

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. Then make your fetch call in the Sentry.onload callback.
    Example
    Copied
    <script>
      window.sentryOnLoad = function () {
        Sentry.init({
          // ...
        });
      };
    </script>
    
    <script
      src="https://___JS_SDK_LOADER_HOST___/___PUBLIC_KEY___.min.js"
      crossorigin="anonymous"
    ></script>
    
    <script>
      Sentry.onLoad(function () {
        fetch("/api/users");
      });
    </script>
    
  • Use the CDN bundles instead of the Loader Script. This will ensure that the SDK is loaded synchronously, and that all your fetch calls are traced.

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 below.

To use Sentry for error and tracing, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/11.6.0/bundle.tracing.min.js"
  integrity="sha384-yktoq3bnSR9ZyyKjW/n9Co8AAItq1N/6OuvY9mTtMhl/IBpCbsDs6N6hugod29Hc"
  crossorigin="anonymous"
></script>

To use Sentry for error and tracing, as well as for Session Replay, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/11.6.0/bundle.tracing.replay.min.js"
  integrity="sha384-Sxg7cMUjNMIulvW16S83vtu2xGk2jl1hCbuN/vdJXLeFUB0rrAcvT2WuFJHf2XsU"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, as well as for Session Replay, but not for tracing, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/11.6.0/bundle.replay.min.js"
  integrity="sha384-3y42flZpnpDYCiRD9Prooi7OSW4EaZ3ZxG+FXbeVLFvsLtUPy66qvu4GYhbcpHYk"
  crossorigin="anonymous"
></script>

If you only use Sentry for error monitoring, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/11.6.0/bundle.min.js"
  integrity="sha384-rlznaM0ZTdlKZRMeVO8a43/HbvKhLqHABk8FFcshozlZDT84nCfG8GdTIWeQioHe"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, logs, and metrics, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/11.6.0/bundle.logs.metrics.min.js"
  integrity="sha384-MHjuI47RjdG+mPMgEMZq/io+EE1drfPPzD6utXXc+eXSN9vFuA6pCLrEUfVwUR1I"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, tracing, Session Replay, and User Feedback, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/11.6.0/bundle.tracing.replay.feedback.min.js"
  integrity="sha384-CxpBZTJbOen01KzGQHk+4XLnJaLLnl+azuAzknRHjw8gIZY2ZgJD2SfjfMKuzOs1"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, Session Replay, and User Feedback, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/11.6.0/bundle.replay.feedback.min.js"
  integrity="sha384-JjDiLqLuAJjWk8ROA3LZc23WyTreGZN988Qb/bIu5f6R5vGGfYhMllVPquyRWL6D"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, tracing, logs, and metrics, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/11.6.0/bundle.tracing.logs.metrics.min.js"
  integrity="sha384-uopb9zBVBzCEtzl9nmu1m61ALAFwHP8ap/uPm+TxcP89V9B4IfblKhY8Kf8KGDv5"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, Session Replay, logs, and metrics, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/11.6.0/bundle.replay.logs.metrics.min.js"
  integrity="sha384-WVRecWtmvbWCQbOIRtHkEqVqC4XNNKz8iJB+4SvX1WuBQ2dOPam/sMdUqnftfDKE"
  crossorigin="anonymous"
></script>

To use Sentry for error monitoring, tracing, Session Replay, logs, and metrics, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/11.6.0/bundle.tracing.replay.logs.metrics.min.js"
  integrity="sha384-zxlNseLDIvQvD7vURt2+qGkQ6jb0gR6GD9MFRBsiQMlXdVfeTsuB82OqVmYRzr4f"
  crossorigin="anonymous"
></script>

To use all Sentry features including error monitoring, tracing, Session Replay, User Feedback, logs, and metrics, you can use the following bundle:

Copied
<script
  src="https://browser.sentry-cdn.com/11.6.0/bundle.tracing.replay.feedback.logs.metrics.min.js"
  integrity="sha384-P82TNA2fDz/HQ1w0vEzd1iGchsd7//5i3VNHzUo5FeLUaS9JPstfoTI+YGm7AluY"
  crossorigin="anonymous"
></script>

Once you've included the Sentry SDK bundle in your page, you can use Sentry in your own bundle:

Copied
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/],
});

Our CDN hosts a variety of bundles:

  • bundle.<modifiers>.js - Base bundle with error monitoring only
  • bundle.tracing.<modifiers>.js - Error monitoring and tracing
  • bundle.replay.<modifiers>.js - Error monitoring and session replay
  • bundle.feedback.<modifiers>.js - Error monitoring and user feedback
  • bundle.tracing.replay.<modifiers>.js - Error monitoring, tracing, and session replay
  • bundle.replay.feedback.<modifiers>.js - Error monitoring, session replay, and user feedback
  • bundle.tracing.replay.feedback.<modifiers>.js - Error monitoring, tracing, session replay, and user feedback
  • bundle.logs.metrics.<modifiers>.js - Error monitoring, logs, and metrics
  • bundle.replay.logs.metrics.<modifiers>.js - Error monitoring, session replay, logs, and metrics
  • bundle.tracing.logs.metrics.<modifiers>.js - Error monitoring, tracing, logs, and metrics
  • bundle.tracing.replay.logs.metrics.<modifiers>.js - Error monitoring, tracing, session replay, logs, and metrics
  • bundle.tracing.replay.feedback.logs.metrics.<modifiers>.js - Error monitoring, tracing, session replay, feedback, logs, and metrics

Some integrations are available as separate bundles. See Lazy Loading Integrations for the supported list.

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 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
FileIntegrity Checksum
browserprofiling.debug.min.jssha384-q1me1durj2pP/hDl5U26ZDI52iN9bWprLvupf29FQlr0edtGow5ciioUeO5iS2l2
browserprofiling.jssha384-J2TsiG9xEdyPzYakbqVb7BKW8ofHpOUg8ANV7HMnlo57wt0W/b32V/Lw8UiZpuvJ
browserprofiling.min.jssha384-Yy30XSRqakcA6DZZfiZTSFepmoS1nVtfGfg5kHHN4KgLjmB02Eb4bhwNq5Na+fdk
bundle.debug.min.jssha384-yxlSx3UCXcnf+GdwNHcu/TUkLbBbRF1j4Pewfpt18dqnBgwlGzFTNvz3Z6Mzfcdw
bundle.feedback.debug.min.jssha384-SWRJTM1e8DvJOd1UCPD76iyxG9mLR7V71O6JthUet24Bw2KrxEh+QWacJHcU/bh7
bundle.feedback.jssha384-Lt96mTMABWR4PCM54jLk9FKcFWI0wfLaasxJ2OCMhG7+yFEFG/MUzBg4V9P8DjvV
bundle.feedback.min.jssha384-bcp1j0s+2L59upN0IsdjBsqCC7pF5UBHX17vCYp093L0C0y9UGIMrpl4bR7NQ6Jj
bundle.jssha384-PjwYrmaPK67l2zP/xbvkeQr3hJ89u0ZTjdVeLFG5B5UgXX8ffD4AMDxYYhKxYTqx
bundle.logs.metrics.debug.min.jssha384-sGqhM46ZZbyefRop/CvzvCwJAT82hhW3SHoykQLYyzk5AMOpdyE+s97Dht8o0h2k
bundle.logs.metrics.jssha384-6VYt3keyWKcIQWy0H8N7//DHLg+a8TRzMte4CrI5IDjP/szt1E30z6STY9DOqL1a
bundle.logs.metrics.min.jssha384-MHjuI47RjdG+mPMgEMZq/io+EE1drfPPzD6utXXc+eXSN9vFuA6pCLrEUfVwUR1I
bundle.min.jssha384-rlznaM0ZTdlKZRMeVO8a43/HbvKhLqHABk8FFcshozlZDT84nCfG8GdTIWeQioHe
bundle.replay.debug.min.jssha384-49exKHZmq/iLSbYiDIJKGgENNrivKI4d7f6J6VRRrkqlguBGLm3TCJkNXYzSYNyR
bundle.replay.feedback.debug.min.jssha384-JQYy7xcrSV+5qIOC/+6Adz5X4SxlbxYlmzgKQT+ZXuaykY6hSZk5+bjI6B+TxgKz
bundle.replay.feedback.jssha384-2HUGwVYJulqPSBZKbqesF/xQXZ4PgqouOlOdDTen6cpgIO2XxZ9Neo5lZ+5TTU5/
bundle.replay.feedback.min.jssha384-JjDiLqLuAJjWk8ROA3LZc23WyTreGZN988Qb/bIu5f6R5vGGfYhMllVPquyRWL6D
bundle.replay.jssha384-4muuJfE0nZc7ZlvN7Lr0yQcCGZAAsH+wn9nOf/YALCxwFSZUd2bWrQ0jIBwmR3rC
bundle.replay.logs.metrics.debug.min.jssha384-0x+UP0uSH+0Aos3MUiU1B6Pj6uJeg1NGJAsMWSK71D6MMzSfyT9WY79VRdtKSKgQ
bundle.replay.logs.metrics.jssha384-qrmvYmJK/ymoJJu0DjdYH6DsQeMcIhHCt1EiudaKegO46oqmGQwH1Kc8yeD0Cv/E
bundle.replay.logs.metrics.min.jssha384-WVRecWtmvbWCQbOIRtHkEqVqC4XNNKz8iJB+4SvX1WuBQ2dOPam/sMdUqnftfDKE
bundle.replay.min.jssha384-3y42flZpnpDYCiRD9Prooi7OSW4EaZ3ZxG+FXbeVLFvsLtUPy66qvu4GYhbcpHYk
bundle.tracing.debug.min.jssha384-hriAb+9OefISIQiLe+5MtwsewCYbLEKzwVxCc2TbKeRWzuyRpVObmKLET1JH7AjT
bundle.tracing.jssha384-dj9V8EYGdQV0sQvnbzYA1Wkf2tKitEl5nrd47NQDuLrIYj1gxZ2U+ZugBh8b73VJ
bundle.tracing.logs.metrics.debug.min.jssha384-+BcMDg27KLIDPqmxpim/IfSfdiu9iuAhJodnR+PLm21qpbFjXaX8ZrMylML92eog
bundle.tracing.logs.metrics.jssha384-t3dT0r3KKI3rlx1mCpXLe0YR3x7OWQXJVxz5MTeYK6bZAGG8tUk/nhvzNoZenEt7
bundle.tracing.logs.metrics.min.jssha384-uopb9zBVBzCEtzl9nmu1m61ALAFwHP8ap/uPm+TxcP89V9B4IfblKhY8Kf8KGDv5
bundle.tracing.min.jssha384-yktoq3bnSR9ZyyKjW/n9Co8AAItq1N/6OuvY9mTtMhl/IBpCbsDs6N6hugod29Hc
bundle.tracing.replay.debug.min.jssha384-j3gwcb7Btpdkq5vtSExBoFCz9N6yR256XOP8s2ruaYNVPTWN7NphH17qwbi06Qlv
bundle.tracing.replay.feedback.debug.min.jssha384-mk3yEk73oRUOsboEszKXUu/BgsFDYGxKc5EkyVVmfok5RzK5wdgCGkL8YMH6hGez
bundle.tracing.replay.feedback.jssha384-hkw3FLoYah8XHhi9KJEwUj3BlFsMl7AccVePgGschLcXI1ulmTEzRQZLI4geOzT/
bundle.tracing.replay.feedback.logs.metrics.debug.min.jssha384-GNxsecuVWf42YIqRuKcH3yw89Be8lhz/tO0VHq1H1z68dOvlKNy8BYuzUaxBd8a6
bundle.tracing.replay.feedback.logs.metrics.jssha384-CZu0IjOjVN4JEwxebd2kGQwY4FqH5ZbHcQcmmHaad2RriwZ8XrbS4UpT5y5eqSK9
bundle.tracing.replay.feedback.logs.metrics.min.jssha384-P82TNA2fDz/HQ1w0vEzd1iGchsd7//5i3VNHzUo5FeLUaS9JPstfoTI+YGm7AluY
bundle.tracing.replay.feedback.min.jssha384-CxpBZTJbOen01KzGQHk+4XLnJaLLnl+azuAzknRHjw8gIZY2ZgJD2SfjfMKuzOs1
bundle.tracing.replay.jssha384-cEZqRRrgViglaxlAsr0z43cfXMQpb+gFAXMhVHg6U/icZ5IBy1yupYrLURC/Fksi
bundle.tracing.replay.logs.metrics.debug.min.jssha384-PzdBTvvmmlpsgUEWV2PHZBrGLNTS/QFbNb4E604m8KwyvIGWdT1m0SEpQFO+yOBk
bundle.tracing.replay.logs.metrics.jssha384-PKmiEo4TTxrXxksLrJLUwueYw/MAM4tCy6oz7+4sjaO7JIqeRL8ILrc9Ba8SyLx7
bundle.tracing.replay.logs.metrics.min.jssha384-zxlNseLDIvQvD7vURt2+qGkQ6jb0gR6GD9MFRBsiQMlXdVfeTsuB82OqVmYRzr4f
bundle.tracing.replay.min.jssha384-Sxg7cMUjNMIulvW16S83vtu2xGk2jl1hCbuN/vdJXLeFUB0rrAcvT2WuFJHf2XsU
captureconsole.debug.min.jssha384-QtcWQ6fZosK3A/sT2gzsH/JOsoPy7Ho27laHdU7wNLmUlY8uW3h/BRGdmrKPN4Df
captureconsole.jssha384-SZMN9/gXEhj7dnq7Di1cKoOjysNK25+WaeOPXpYYNZhIeqBRvyiMdkE4T5As2Qfm
captureconsole.min.jssha384-Xs9D5wB4AfbWHxm2hkGvHhC+3uT3fkFBqcLvmdj8U9/i9r59dkAKzJi+SJ69c4ix
contextlines.debug.min.jssha384-lQ13xj4WkET1vHRQJPtE6RLzRgHfviA5ekuHP5F2C0LKggHXLIRNwQmH4sIIwOix
contextlines.jssha384-ghpAN0OJdyXIW9fYpgfiqhI7YaJ/XvgZ+n7otWD337bPrUnksFk/2CoUng9/Slut
contextlines.min.jssha384-ADIk/2B8pim3/DXk3OmyS11O/kGbhirvxX7dpSUbQuv8QGhfzCOGQeZ0JKwGkUuB
dedupe.debug.min.jssha384-HlBhSxdMpHkQ8pguopL56Kn0+pvFPH8ANK2H3pfkds92YwOe7pWWbgqHLYA33orh
dedupe.jssha384-XXH5pFwenewVs4tXs/Strj9cjfR9SuRd2H4hc5FZM7uc014X77oh80RTyywyWgqF
dedupe.min.jssha384-cZrF0AhEgwP6KSfK95IdsaqHbXBrbBD4fJCn/FMMY+q8CK8XY7AnHJLWbEvJ54fR
extraerrordata.debug.min.jssha384-L8uYuvjA6OK4Rs/oLq+3p8zHWWSmbcj5zVIxgqPDljNmEpc8CUdWRbcmy/tslQ14
extraerrordata.jssha384-vPRFPOFVtiUJOIs0TKJDPSVZzM9ZAwex7pmsUldh70E5YBtVuPM9e7EhgsMETdEw
extraerrordata.min.jssha384-tG4W63sUR1M9HwGrd5AzFyoqY8p39Y/9x38Czsk6X6eWs1Q326fDLT3f0AdoOtkZ
feedback-modal.debug.min.jssha384-/GxqLfunUNxI7gtq+GKICeG+0pq2FxJQEJ1Nbbe2vGS83sIZAXn6rx6Vkz7LXmQZ
feedback-modal.jssha384-P07T+x+mI0WX7OBCEWVVDUe12pSfYMQ1bYEyT/3Wo8MtO+nzM+O1bHfhHCk6UIAa
feedback-modal.min.jssha384-PMNc2ZqHnIFmyT6T+7/hlEx1mQH6RasD6zdrvZnylQrH+OmeXqT5460ysxg/3CRP
feedback-screenshot.debug.min.jssha384-zIfZ9vReV4bfm4mU33OMuYy91w7+2V4Ov8IgV11mxfcRLRyQXBPO/BIiZVvqo0M8
feedback-screenshot.jssha384-OOB1hxa8tuUsJVH55iy27XkH+9YLMCvceXiaojRqufm7x0azPGra2Odl5LDsUcSv
feedback-screenshot.min.jssha384-UrEt9uNpI/koQ7KURsAX1aZ+4svVUa5KOxbWVMrZldNVvR88vBLLMiFLdxfEYD+n
feedback.debug.min.jssha384-f3SEEiSSESMxITQx+CkSBk4jKoJfvSu3yz5ZFMySqIe3zocRUZSSuhn02w5Aw4tm
feedback.jssha384-40ZajcwQ13/ueMZ0nxHhTkYOv748lr+txAPMu615ws1N0PnqqfXmivwfIRYdoQhN
feedback.min.jssha384-JrEU4WJm7DDsMq9T/vj3/eM4Lzz3uedZM+PIbTtEk1kE0Uj78ow8YwhNp2dZTYjn
graphqlclient.debug.min.jssha384-KurZTSkHHMCWWxeZgz2h+UTSqafbhUOXjt06G2bQZN2MpDZ07A55xFZC3QrC+cmf
graphqlclient.jssha384-xVYvs4w9SLka756Txj3R7BgPPPGfGr/R4Aw6p/x7/KbaOxVODpk49mBI+sVSO3GC
graphqlclient.min.jssha384-6nfrXmKdl2U+kCpYAFxpNx4QskeC5uztZV6NVSr5s1YL2tpMRw8BCH0Fi6065pBL
httpclient.debug.min.jssha384-7VK5g49D6DLvfmAFSX9k+yHZkyGbf1Rd92NGUQHwxAir1K1DDVE8/oUuxlkAia5H
httpclient.jssha384-UG45IieI49RsbELj+3GFYF0yUQD6LbCVZS+SPAWmtN0q1qx1Gss2VmTbpHe0s5Jl
httpclient.min.jssha384-snxY6hSlIsIeXE4QIzLTRtuD7yDFUxMfoPkl/xKKA0bXbYlBJe5e+PrUXVUmF2Xm
interactions.debug.min.jssha384-lNdy5fV9p5yQrivqMJkw0F/9MaQo4CniWaiKRjcDmzY6SXLdMcpXlM3+xbBnfgbd
interactions.jssha384-NwKruNfYor1cjcRMKLDYag4gI1JcDPiN+1Uf5vr0lhuzvNzSM19BCRpc1ZbhhhU0
interactions.min.jssha384-tHtjgXw/uEI9pC/MWQQI+6gm30MbgA4ab1OCgX16bs+TdMS77JxRZMkJFgF+Olbt
modulemetadata.debug.min.jssha384-5+gqMjCH4O9BZfgnk2UfaaxHPH7NmKWrWj+n0FJh6ThYeFHRTAqENGUnTHRPBSJQ
modulemetadata.jssha384-XSa8Z72syQfW86iZYHe3AsA/wGqvUJtJp1aFJYUXCOj30/ZwIyEsk5SOyvjwxfgv
modulemetadata.min.jssha384-6alWNkjxhGc5Z8W3102nzuKb8H+CfE57Rqa0a61kw0NL/I5KPnHC9LiS7Ae1EVwU
multiplexedtransport.debug.min.jssha384-i9jDk5GTU07WhqYea8gqfGEXV7inrB24BQwq94DhGQ0kiLoIC0l1dp6CJIKpsRek
multiplexedtransport.jssha384-UmHrFysGi0qdt1DR+b9YStrsBVB9OhADICVAobv1m8EMlVn3DIDsIDfQ4s9ydpP6
multiplexedtransport.min.jssha384-k++aZszA0zihIJ/RqhqnSR1EUHa9U/nrrTUf1QTv/KwwvTASQSBjUUUoYSL8Nx64
replay-canvas.debug.min.jssha384-VErTHoHl7b9ozpBnCGhqew6lleUBZq8FxZUzCB5XLyunsc7T0Z0KWNUPz3+fu+tv
replay-canvas.jssha384-8MZcLR4M7w2MLNHWVuln/RZ3nZm9JES4l3ZHsSX9OySsc0PAmOyn3k6YCbi5jAhh
replay-canvas.min.jssha384-5RGY5JKloVUM9AtSPO3SPEBlAeeFCizDaxipOq7ETkP2FyN7D1iWkYAcurHCo7Ew
replay.debug.min.jssha384-xrHjidTIs9DL9Rp4r0b/0a2S582XOSs9DV5vtgRQp5KRMBWLC42J2waBX6btgVBb
replay.jssha384-ueEvWhiyv4t+OXNbuTUftyulQB+Rk/tYv+zgExJp58TxO3BTBFePdAdpL+WbSxdn
replay.min.jssha384-SDBgxQER8es9CnmEtfaK9X5404WyrPF2mP4rXJY8SiBPrhFDqu+D1JwOgx0vl4Cu
reportingobserver.debug.min.jssha384-JUtkUW2htdgYqoMEioVy5E7cM65AixNTz+s+WCKlTTJOC16O0yIpV5rV12EWtTKb
reportingobserver.jssha384-f6AE1YevQ9zUC6q1KYS/FokTgIpjIX6Xfs7migkaWUIpTqetbR6qWbJN0IlzI+L6
reportingobserver.min.jssha384-Qr44WfkijVaEUHb0uwIsfuCTd9u6ibwY4xbDdK0rGpNPWJbmHLdw6q1nSdMkV6Kf
rewriteframes.debug.min.jssha384-o3kdf70LYhhMVZ+emvW7Qkr3CQjGrIC04ShuEAJ9n/WZnXcw+WxyT9W02cRN5Im1
rewriteframes.jssha384-W3fKBSHpErRg1MBcCcnZPAECCBu9lQ1hOt3P+SJElPAQ9VNohw8KCxyTOv5KrSm1
rewriteframes.min.jssha384-wr5WXNPJhwYJOBmdmTeEbeA5Qxx3uO5u7fU0CFiOGFgt45iYtMU9CxdYizOyr10U
spotlight.debug.min.jssha384-q/XkDVsbB6KEoYC7jVfUy9+IZUvNmdqzgJrbpF5zGyqkePemYGNP9dwGGL4PTjDu
spotlight.jssha384-MvXwZ/PsUzz4g2pkemZguj6nfycuY7tqJX7yOuxAM9pFCajhF6eLbmfCOpaHIrCT
spotlight.min.jssha384-RObsVS+WrjJdqdjxzLhHsBPsT6iOH81NVMdrDk99nzC1v/m1wluTzF0H1CWDfopW
usertiming.debug.min.jssha384-AterQfJ0uutxoS2PR5KgsNHBKafS3vFn1zQpX1ck1a7OMUVQG35dKwnYIRZ9cjQB
usertiming.jssha384-0KkR6OLTqy5ZcpW6b7rvIyQzq9u6Fx3QnzK1KsoMVB88hgfAQRPcMv46E0AH+bZ7
usertiming.min.jssha384-WiJ6rszDZiVTI7WFyt0sNDWIgkeGw0+e9HMU36rvqgBfEgzEOKswXzUeaaXsXR2d

To find the integrity hashes for older SDK versions, you can view our SDK release registry for the Browser SDK here.

If you use the defer script attribute, 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.

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
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").