Legacy Browsers (IE11)
How to install the Sophonz Browser SDK in legacy browsers including IE11.
The Sophonz Browser SDK provides limited support for legacy browsers. Supported environments include IE11, Chrome 52, Edge Legacy 79, Safari 11, and Firefox 57 and above.
NOTE — Test environment
Tested on Internet Explorer 11.
Installation via package manager
If using a package manager (npm, yarn, pnpm, bun, etc.), install the @sophonz/browser-sdk package.
npm install @sophonz/browser-sdkImport from @sophonz/browser-sdk/legacy as shown below.
import SophonzSDK from "@sophonz/browser-sdk/legacy";
SophonzSDK.init({
collectorUrl: '{{SOPHONZ_TRACES_COLLECTOR_URL}}',
appName: '{{YOUR_APP_NAME}}',
appVersion: '{{YOUR_APP_VERSION}}',
appKey: '{{YOUR_APP_KEY}}',
project: '{{YOUR_PROJECT}}',
deploymentEnvironment: '{{DEPLOYMENT_ENVIRONMENT}}',
// additional options...
});NOTE — Bundle format
Bundled in umd format, which is compatible with commonjs, amd, iife, and other module environments.
Installation via CDN or local file
Add a CDN or local js file to your HTML. The example below adds the Sophonz Browser SDK CDN path to index.html and initializes it. For air-gapped environments, refer to the Air-gapped Installation section.
<script
src="https://cdn.sophonz.com/release/npm/@browser-sdk/latest/index-legacy.js"
type="text/javascript"></script>
<script>
window.Sophonz.init({
collectorUrl: '{{SOPHONZ_TRACES_COLLECTOR_URL}}',
appName: '{{YOUR_APP_NAME}}',
appVersion: '{{YOUR_APP_VERSION}}',
appKey: '{{YOUR_APP_KEY}}'
project: '{{YOUR_PROJECT}}',
deploymentEnvironment: '{{DEPLOYMENT_ENVIRONMENT}}',
// additional options...
});
</script>NOTE — index-legacy.js file
index-legacy.js is a bundle built specifically for legacy browser compatibility. You can also extract it from the tgz package — find index-legacy.js inside the build folder and add it directly to your project.
tgz package download: https://cdn.sophonz.com/release/npm/@browser-sdk/latest/sophonz-browser-sdk-latest.tgz
To install a specific version, use @browser-sdk/{VERSION}. Supported versions start from 1.0.0. The SDK initialization code is the same across versions — once configured, all instrumentation runs automatically.