If you fix Core Web Vitals once and leave it, the problem comes back within a few weeks. A new plugin, an enlarged hero image or a marketing script added to the tag manager silently wipes out the gain. Nobody notices. Until the Search Console report turns red. This guide describes the measurement setup that makes improvement last: reading Chrome UX Report (CrUX) sources correctly, setting up your own real user monitoring (RUM) with the web-vitals library, reporting by page group and catching regressions before users feel them.
The difference between lab data and field data
The “Performance” section of Lighthouse and PageSpeed Insights is lab data: a single page load on a defined device and network profile. Because it’s repeatable, it’s suitable for debugging and comparison during development. Field data is the experience real users have with different devices, networks, cache states and behavior.
| Feature | Lab | Field (CrUX/RUM) |
|---|---|---|
| Conditions | Fixed device and network | Real user distribution |
| INP | Not measured in a load audit, TBT is a proxy metric; can be measured with interaction in a timespan recording | Measured from real interactions |
| CLS | Only during loading | Over the page’s lifetime |
| Repeatability | High | Read as a distribution |
| Use | Diagnosis, CI checks | Status assessment, monitoring |
The page experience assessment used in search results is based on field data. Put field data at the center of your monitoring setup; use lab tests to answer the question “why”. The lab diagnoses. The field decides. What the metrics measure and how they’re improved is covered in the article on speeding up a website with LCP, INP and CLS; here the focus is measurement itself.
CrUX data sources and their limits
CrUX is a public dataset collected from Chrome users who have opted in to sharing usage statistics. The same data is offered through different interfaces with different levels of detail and time resolution:
| Source | Detail | Time | Suitable use |
|---|---|---|---|
| PageSpeed Insights | URL and origin | Last 28 days | Checking a single page |
| CrUX API | URL and origin, by device type | Last 28 days, updated daily | Automated daily tracking |
| CrUX History API | URL and origin | History in weekly periods | Trend charts |
| BigQuery dataset | Origin only | Monthly | Long-term, competitor comparison |
| Search Console report | Groups of similar URLs | Last 28 days | Template-level problem detection |
Don’t interpret this data without knowing its limits:
- Eligibility threshold: A URL or origin appears in CrUX only if it has enough traffic and is public. Low-traffic service pages usually only have origin-level data.
- Audience: Only the desktop and Android versions of Chrome; Chrome on iOS and other browsers aren’t included.
- Lag: Because of the 28-day rolling window, the effect of a change is reflected gradually; the effect of yesterday’s release isn’t visible today.
- No root cause: CrUX doesn’t tell you which element is the LCP or which interaction is slow.
A single request is enough for daily tracking with the CrUX API:
curl -s "https://chromeuxreport.googleapis.com/v1/records:queryRecord?key=$CRUX_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"origin": "https://www.example.com",
"formFactor": "PHONE",
"metrics": ["largest_contentful_paint",
"interaction_to_next_paint",
"cumulative_layout_shift"]
}'
The response returns, for each metric, the proportions of the good/needs-improvement/poor buckets (histogram) and the percentiles.p75 value. If you give url instead of origin, you query at page level. If there’s no data, the API returns a 404; this isn’t an error, it means “not enough data in CrUX”. Running this call every day with a scheduled task and storing the result is the cheapest way to keep CrUX history in your own hands.
The 75th percentile and the assessment logic
The Core Web Vitals assessment looks not at the average but at the 75th percentile (p75): if three quarters of page loads are below the threshold, the metric counts as “good”. An average can be skewed by a few very slow visits or hide the bad experience of a large audience; p75 is a balanced measure between the two. The thresholds are defined on web.dev:
| Metric | Good | Needs improvement | Poor |
|---|---|---|---|
| LCP | ≤ 2,5 s | 2,5–4,0 s | > 4,0 s |
| INP | ≤ 200 ms | 200–500 ms | > 500 ms |
| CLS | ≤ 0,1 | 0,1–0,25 | > 0,25 |
The assessment is done separately for mobile and desktop. For a page to “pass”, the p75 values of all three metrics must be in the good range. Use the same logic when reporting your own RUM data: the same percentile, the same device split, a similar time window. Otherwise your internal report and Search Console tell different stories, and the meeting is spent arguing over which number is right.
Setting up your own RUM with web-vitals
Google’s open-source web-vitals library measures the metrics in the browser with the same definitions as CrUX and is small in size. Basic setup:
import { onCLS, onINP, onLCP, onTTFB } from 'web-vitals';
function send(metric) {
const body = JSON.stringify({
name: metric.name, // LCP, INP, CLS, TTFB
value: metric.value,
rating: metric.rating, // good | needs-improvement | poor
id: metric.id, // unique per page load
navType: metric.navigationType,
page: document.body.dataset.template || 'other',
path: location.pathname
});
(navigator.sendBeacon && navigator.sendBeacon('/rum', body)) ||
fetch('/rum', { body, method: 'POST', keepalive: true });
}
onCLS(send);
onINP(send);
onLCP(send);
onTTFB(send);
The points where setup most often gets stuck:
- Reporting time: CLS and INP change over the page’s lifetime; the library usually sends the final value when the page is hidden. That’s why
sendBeaconorkeepaliveis needed. If plainfetchis used, data is lost when the tab closes. - Deduplication: The same metric can be reported more than once in a page load. On the server, store the latest value for
id+name. - Page group: In the example, the template name is read from a
data-templateattribute on thebody. Marking the template itself is more reliable than grouping by URL; the report doesn’t break when the URL structure changes. - Diagnostic data: The library’s
web-vitals/attributionbuild adds root-cause information such as the LCP element and the interaction target that caused the INP. Since field names can change between versions, rely on the README for the version you use. Analyzing slow interactions is covered in the article on finding and fixing INP problems. - Browser support: Support for the browser APIs that LCP and INP rely on varies from browser to browser; in an unsupported browser, the relevant metric is never reported. Keep the browser family as a separate dimension in the report.
- Privacy: Design the measurement data so that it contains no personal data; don’t store IP addresses, and don’t send query strings (
location.search). Clarify how your cookie consent policy classifies the measurement script.
The measurement script adds load to the page too. Instead of embedding it in a separate analytics bundle, merge it with the existing bundle and account for it within the JavaScript budget.
Reporting by page group
A single p75 value for the whole site doesn’t tell you where the problem is. On a corporate website, the home page, service pages, blog posts and form pages run with different templates, different images and different scripts. Break the report down by at least these dimensions: page group, device type (mobile/desktop), metric. An example of calculating p75 from collected raw data (PostgreSQL):
SELECT page_group,
device,
name AS metric,
percentile_cont(0.75) WITHIN GROUP (ORDER BY value) AS p75,
count(*) AS samples
FROM rum_metrics
WHERE received_at >= now() - interval '28 days'
GROUP BY page_group, device, name
HAVING count(*) >= 200
ORDER BY page_group, device, name;
The lower limit in the HAVING line is an example value; its purpose is to stop the percentile values of groups with only a few visits from looking “definitive” in the report. Adjust it to your own traffic, and always write the sample count in the report. A p75 without a sample count is misleading.
Regression detection and alerting
The purpose of monitoring isn’t a retrospective report but catching regressions before they show up in CrUX. A working setup has three parts:
- Baseline: The p75 value of the last 28 days for each page group and device.
- Short window: The p75 value of the last 3–7 days. The short window reacts much faster than the rolling window.
- Rule: If the short-window value exceeds the threshold limit (e.g. LCP 2.5 s) or worsens by more than a margin you set relative to the baseline, and there are enough samples, raise an alert.
What makes an alert meaningful is context. Record releases (deploys), plugin updates and tag manager changes on the same dashboard with timestamps; which change a regression started after is often visible at a glance. Without a change log, the hunt for the root cause takes days. On the lab side, adding a check such as Lighthouse CI to the CI process is a complementary way to catch regressions before release.
Monitoring checklist
- A daily record is taken for the origin and important URLs with the CrUX API.
- LCP, INP, CLS and TTFB are collected with web-vitals and deduplicated by
id. - Reports are presented by page group and device type, with p75 and sample count.
- Alerts are generated by comparing the short window with the baseline.
- Release and configuration changes are marked on the dashboard.
- The Search Console Core Web Vitals report is reviewed monthly.
Field measurement pays off when it’s connected to the same operational setup as uptime and error monitoring. We build this setup on a single dashboard in our web monitoring and uptime monitoring and web performance and Core Web Vitals work.
Frequently asked questions
My Lighthouse score is high but pages look bad in Search Console. Why?
Lighthouse makes a lab measurement on a single device and network profile; Search Console evaluates real users’ field data from the last 28 days at the 75th percentile. Slow devices, weak mobile connections, cookie consent and real interactions don’t show up in the lab. Field data is what counts.
My site doesn’t appear in CrUX. How do I measure Core Web Vitals?
CrUX only includes public pages and origins with sufficient traffic. If there’s no data, setting up your own RUM measurement with the web-vitals library is the only reliable way to get field data. Lab tests point the way but don’t replace field data.
Why don’t RUM data and CrUX values match exactly?
The scope is different: CrUX includes only Chrome users who have allowed measurement, while RUM collects data from all browsers that support the metrics and, depending on your consent policy, from a different audience. The time window and sampling may also differ. What matters is that the two sources move in the same direction.
Can individual pages be bad while origin-level values are good?
Yes. The origin value is calculated from all page loads on the site, and high-traffic pages determine the result. Even if a rarely visited service or form page is bad, the origin p75 value can look good. If there’s no URL-level data in CrUX, the only way to see these pages is a RUM report by page group.