Skip to main content

CDN browser SDK installation guide

As part of our Real User Monitoring (RUM) toolkit, Coralogix offers multi-faceted Error Tracking, enabled by our CDN RUM Browser SDK.

Overview​

Using a CDN RUM browser SDK enables quick and efficient deployment of monitoring tools by simply embedding a script tag in your HTML, without needing to install packages or set up a build system. This approach offers significant advantages: it minimizes setup time, leverages globally distributed CDN infrastructure for low-latency script loading, and benefits from browser-level caching, which can reduce load times and improve performance. Additionally, it allows developers to integrate RUM into static or legacy sites without major codebase changes, making it a convenient solution for capturing real-world user performance and behavior data with minimal effort.

For information on our NPM Browser SDK, view this page.

What you need​

  • RUM key: a Send-Your-Data key with the SendRUMData role preset. Create it before the setup below. The key is public, and the preset is standalone, so it can't be combined with other presets. Don't use SendData: it carries no RUM permissions, and keys created with it must stay secret, so they don't belong in client code.

Configuration​

Select the exact version required for your use case.

By default, the CDN is built using the ES2015 (ES6) standard.

Use a specific browser version (https://cdn.rum-ingress-coralogix.com/coralogix/browser/[version]/coralogix-browser-sdk.js). Replace [version] with a version from our Releases page.

Note

The latest CDN version option is no longer available. Use an explicit version instead.

ES5-compatible version​

For legacy environment support, ensure you're using the ES5-compatible version (https://cdn.rum-ingress-coralogix.com/coralogix/browser/[version]/coralogix-browser-sdk.es5.js).

Adding CDN script to your application.​

<head>
...
<script src="https://cdn.rum-ingress-coralogix.com/coralogix/browser/[version]/coralogix-browser-sdk.js"></script>
</head>

Initialization​

Initialize the SDK using a JS or TS file.

JS file​

window.CoralogixRum.init(...);

TS file​

window.CoralogixRum.init(...);

// In case of warning from TSC
declare global {
interface Window {
CoralogixRum: CoralogixOtelWebType;
}
}

SDK configuration and features​

This install path uses the Browser SDK, so its options and features are documented once on the SDK's own pages rather than repeated here:

ConfigurationOptions - including ignoreErrors, ignoreUrls and anonymous users
Sampling
Before send and transport
FeaturesLogs and errors - including Web Vitals and the TBT metric
Session recording

Additional resources​

Last updated on
On this page
Was this page helpful?