Real user monitoring
Measure Core Web Vitals and JavaScript errors from your real visitors.
What you measure
| Measure | Tells you |
|---|---|
| LCP (Largest Contentful Paint) | How fast the main content appears. Good: under 2.5 s. |
| INP (Interaction to Next Paint) | How quickly the page reacts to clicks and taps. Good: under 200 ms. |
| CLS (Cumulative Layout Shift) | How much the page jumps while loading. Good: under 0.1. |
| FCP, TTFB, total blocking time | First paint, server response time and main-thread blocking. |
| JavaScript errors | Errors your visitors hit, with the page and browser. |
| Live visitors | Who is on the site right now. |
Break everything down by page, device, browser, operating system, country, connection type, referrer or host, over 5 minutes to 30 days.
Set it up
Create a site
Go to Real users and set up a site. You get a site key that starts with
rum_. It is safe to put in your pages: it can only send data, never read it.Restrict it to your hostnames
In the site settings, list the hostnames the script may report from, for example
example.com, www.example.com. Data from other hosts is refused.Add the script
Add one script tag to every page:
<script defer src="https://api.vitalrix.com/api/v1/public/rum/script.js" data-key="rum_your_site_key"></script>Open your site in a browser. The visit appears under Real users within seconds.
Options
| Option | Effect |
|---|---|
data-respect-dnt="true" | Skip visitors whose browser sends Do Not Track. |
data-trace="false" | Do not add trace context to your own API calls (on by default, see below). |
| Sampling rate (site settings) | Measure only a share of sessions on very busy sites. A session is measured entirely or not at all. |
From the browser to your backend
The script adds a W3C traceparent (and tracestate: vitalrix=rum) header to fetch calls to your own site's address, never to other sites. A backend instrumented with OpenTelemetry continues that trace, so a click and the API work it caused are one trace.
A request that fails (HTTP 5xx or a network error) is reported as a fetch error under Real users › Errors with View backend trace →, which opens the server side of exactly that request. The trace page says it started in a visitor's browser.
From a setup file or an AI agent
A site, with its session replay settings, can also come from a setup file; applying it shows the script tag to add. An AI agent connected through MCP can do both for you: create the site from a previewed setup file and add the script tag to your pages.
rum_sites:
- name: Shop
hosts: [shop.example.com]
replay: { enabled: true, sample_rate: 10, max_duration: 30m, mask_all_text: false }Privacy
- No cookies are set and no IP address is stored.
- Form values are never collected.
- Page paths are grouped, so
/orders/123becomes/orders/:id. - Country is only known when your CDN adds a country header (for example Cloudflare or Vercel).
- Crawlers and bots are ignored.
Good to know
- Web Vitals follow Google’s definitions but are measured by the VitalRix script, so they can differ slightly from Chrome UX Report numbers.
- Safari and older Firefox versions report fewer measures (for example no LCP in Safari), so those have fewer samples.
- Want to see what visitors did? Add Session replay with the same site key.
Something unclear or missing? Open VitalRix and use the in-app setup guides, or read Troubleshooting.