Real user monitoring (RUM)
One script tag: page loads, Web Vitals, errors, API calls and journeys.
In the console: Console → Observe → RUM & Journeys
All guides
Real user monitoring measures your site in your users’ browsers: page loads, Core Web Vitals, JavaScript errors, API calls, resources, clicks and journeys. RUM belongs to the same application as APM (data-app), so a slow page opens the backend trace behind it.
It is one script tag. The RUM key is public by design — it can only send browser events.
Why use it
- Users say the site is slow but your servers look fine.
- You want Core Web Vitals, JavaScript errors and failed API calls from real browsers, per page.
- You want to follow a session and open the backend trace of a slow call.
How it works
- 1rum.js loads in each page and measures page loads, Web Vitals, errors, API calls, resources and interactions in the browser.
- 2It batches events to agent.appstatus.io with a public RUM key that can only send browser events.
- 3Same-origin API calls carry a traceparent header, so the backend trace joins the session.
- 4Masking and consent mode run in the browser before anything is sent.
What you get
- Overview, sessions, journeys, users, Web Vitals (LCP, INP, CLS), pages, API calls, resources, interactions and frontend errors per application.
- Consent mode: nothing is sent until your banner says yes.
- Masking: input values are never read; e-mails, tokens and long numbers are masked in errors; password, hidden and [data-appstatus-mask] elements are skipped.
- Source maps per release, so minified stack traces read as your code.
Set it up
Get Started shows these commands with your key already filled in — copying from there is the quickest path. Here, <your-key> marks where it goes.
- 1
Get the snippet
Get Started → RUM & Journeys. Choose the framework (HTML/JavaScript, React, Next.js, Vue, Other), create the RUM key and switch on what to collect.
- 2
Add it to every page’s <head>
html<script src="https://agent.appstatus.io/rum.js" data-key="<your-rum-key>" data-app="shop" data-env="production" defer></script> - 3
Next.js
tsx// app/layout.tsx (App Router) — pages/_document.tsx works the same way import Script from 'next/script' export default function RootLayout({ children }) { return ( <html><body> {children} <Script strategy="afterInteractive" src="https://agent.appstatus.io/rum.js" data-key="<your-rum-key>" data-app="shop" data-env="production" /> </body></html> ) } - 4
React and Vue error boundaries
Errors React catches in an error boundary (and Vue’s errorHandler) never reach window. Forward them:
jscomponentDidCatch(error) { window.dispatchEvent(new ErrorEvent('error', { error, message: error.message })) } - 5
Options
Each switch in Get Started is an attribute: data-release (needed for source maps), data-api="off", data-trace="off", data-resources="off", data-interactions="off", data-visitor="off", data-console="on", data-consent="required", data-user="<pseudonymous id>".
Check it works
- 1
Open your site
Load a page in a normal browser window (ad blockers can block RUM scripts), then press Test Connection. Page views appear under RUM within a minute.
Use it
- 1
Consent
With data-consent="required", call this from your cookie banner when the user accepts:
jswindow.appstatusRum && window.appstatusRum.consent(true) - 2
Upload source maps
Application → RUM → Settings → Source maps → upload the .map file with the release and the file path it belongs to (at most 30 MB per map). Matching is by release and file, so set data-release on the script. Uploading from CI is not available yet: service-account tokens are read-only.
- 3
Privacy settings
Application → RUM → Settings: consent, session sampling, excluded URLs and blocked selectors. Changes apply without redeploying.
Uninstall / remove
- 1
Remove the script
Delete the script tag (or Script component) and deploy. Browsers stop sending at once.
- 2
Revoke the key and delete the data
Settings → Credentials → revoke the RUM key. RUM data follows the application’s retention.
Troubleshooting
The problems seen most, each with what to run. Still stuck? See the general Troubleshooting guide.
No page views
Check the browser console for blocked requests: a Content-Security-Policy must allow script-src and connect-src for agent.appstatus.io; ad blockers may block it in your own browser. With data-consent="required", nothing is sent before consent(true).
Single-page app shows one page view per visit
Route changes are tracked automatically from history changes. If your router replaces the page without pushState, call the router through the standard History API.
Slow pages do not link to traces
The traceparent header is added to same-origin calls only. Your API must be on the same origin, or allow traceparent in CORS; and APM must be set up for the same data-app.
Stack traces are minified
Set data-release on the script and upload the source maps for exactly that release.
Plan limits
- Each browser event counts 500 bytes against the monthly data pool. Resource timing is not counted.
Related guides
Applications
APM & tracing
eBPF (no code), OpenTelemetry Collector, SDK or Kubernetes: traces, services and endpoints.
Applications
Error tracking
Exceptions grouped by fingerprint, linked to their traces.
Account & billing
Plans, data pool & billing
What counts against the data pool, what happens past it, and how to change plans.
Something here does not match what you see in the console? Open Help → Support in AppStatus or write to support@appstatus.io with the page and what you ran.