Skip to main content

Real User Monitoring (RUM)

Track user sessions, errors, and performance metrics in real-time.

What is RUM?

Real User Monitoring captures actual user interactions:

  • Session Tracking - Track user journeys across pages
  • Error Monitoring - Capture JavaScript errors automatically
  • Performance Metrics - Core Web Vitals (LCP, FID, CLS)
  • Network Monitoring - Track API calls and resource loading

Quick Start

import { SimplrRUM } from '@simplr-ai/js/rum';

// Initialize RUM
const rum = SimplrRUM.init({
apiKey: 'pk_live_xxxxx',
applicationId: 'my-web-app',
environment: 'production',

// Features
trackErrors: true,
trackPerformance: true,
trackNetwork: true,
trackClicks: true,

// Privacy
allowedUrls: [/api\.simplr\.so/],
scrubPII: true
});

// Set user info (after login)
rum.setUser('user_123', {
email: 'user@example.com',
plan: 'pro'
});

React Integration

import { RUMProvider, useTrackView } from '@simplr-ai/js/react';

function App() {
return (
<RUMProvider
apiKey="pk_live_xxxxx"
applicationId="my-web-app"
environment="production"
>
<Router />
</RUMProvider>
);
}

function DashboardPage() {
// Automatically tracks this view
useTrackView('Dashboard');

return <Dashboard />;
}

What Gets Tracked

Sessions

  • Session ID and duration
  • User identification
  • Page/view transitions
  • Device and browser info
  • Geographic location (from IP)

Errors

  • Uncaught exceptions
  • Promise rejections
  • Console errors
  • Network failures
  • Stack traces

Performance

  • LCP - Largest Contentful Paint
  • FID - First Input Delay
  • CLS - Cumulative Layout Shift
  • FCP - First Contentful Paint
  • TTFB - Time to First Byte
  • INP - Interaction to Next Paint

Network

  • API request/response
  • Status codes and timing
  • Request/response size
  • Failed requests

Configuration

interface SimplrRUMConfig {
// Required
apiKey: string;
applicationId: string;

// Environment
environment: 'production' | 'staging' | 'development';
version?: string;

// Feature flags
trackErrors: boolean;
trackPerformance: boolean;
trackNetwork: boolean;
trackClicks: boolean;
trackScrolls: boolean;

// Sampling (0-1, default: 1)
sampleRate: number;

// Privacy
allowedUrls?: RegExp[];
blockedUrls?: RegExp[];
scrubPII: boolean;

// Batching
batchSize: number; // Events per batch (default: 10)
flushInterval: number; // ms (default: 5000)
}

Data Retention

PlanRetention
Free7 days
Starter14 days
Growth30 days
Enterprise90 days

Pricing

RUM sessions consume credits from your plan:

Session TypeCredits
Basic session1
+ Network capture+1
+ Session replay+3 (coming soon)

Sessions under 1 second (bounces) are not billed.

Next Steps