Install the browser agent with a bundler such as npm, Yarn, or pnpm, then initialize it as early as your application starts.

Before you start

You need two things:

  • An Atatus RUM application and its license key.
  • A build tool that resolves npm packages.

Install with a bundler

Install the RUM package, and the logs package if you want browser logs:

$ npm install @atatus/browser-rum @atatus/browser-logs

Initialize both SDKs once, as early as your application starts. Put this before your app renders so nothing is missed:

import { atatusRum } from '@atatus/browser-rum';
import { atatusLogs } from '@atatus/browser-logs';

atatusRum.init({
  licenseKey: '<license-key>',
  appName: 'Storefront',
  env: 'production',
  version: '2026.9.1',
  sessionSampleRate: 100,
  sessionReplaySampleRate: 30,
  trackUserInteractions: true,
  trackResources: true,
  trackLongTasks: true,
  defaultPrivacyLevel: 'mask-user-input',
});

atatusLogs.init({
  licenseKey: '<license-key>',
  appName: 'Storefront',
  env: 'production',
  sessionSampleRate: 100,
  forwardErrorsToLogs: true,
  forwardConsoleLogs: 'all',
});

Next steps