Lighthouse tells you how a page behaves on one machine, once. Your customers get slower phones, worse networks and late third-party scripts. Core Web Vitals real user monitoring (RUM) closes that gap by measuring LCP, INP and CLS in the browsers of actual visitors and sending the data to a backend you control. This guide is about designing that system: the client collector, the payload, the ingestion endpoint, the data model, the aggregation queries and the alerting, with the trade-offs at each step.

If you are looking for the optimization work itself (images, caching, scripts, fonts), start with our guide on how to improve website speed in 9 steps. This article is about knowing, with evidence, which fixes matter for your real traffic and whether a deploy made things worse. (Related: Deploy Hugging Face models easily with Amazon SageMaker...)

Google's Chrome UX Report (CrUX) is free and based on real Chrome people, but it has two limits that matter for engineering teams. First, the CrUX API values are calculated over the previous 28 days as a rolling window, so a regression shipped today blends in slowly and a fix takes weeks to show. Second, it only knows about URLs and origins: it cannot tell you which release, which page template, which A/B variant or which DOM element caused the problem. (Related: The Reformer - Pushing the limits of language modeling...)

Building your own makes sense when you deploy often, need data per tenant or customer, or must keep the data in your infrastructure.

Keep the definitions straight before designing storage. INP replaced First Input Delay as a Core Web Vital on March 12, 2024, so a modern pipeline collects LCP, INP and CLS (plus TTFB as a diagnostic). The "good" thresholds are LCP of 2.5 s or less, INP under 200 ms and CLS under 0.1, assessed at the 75th percentile, with phones and desktop evaluated separately. Google explains that it chose the 75th percentile partly because it is less sensitive to outliers.

So: aggregate with percentiles, not averages, and make device class a first-class dimension.

Start simple: one small service writing to Postgres, and swap the buffer and store later if volume demands it.

In a recent development, do not write the metric logic yourself; INP and CLS have edge cases (back/forward cache, prerendering, background tabs) that Google's web-vitals library already handles. Use its attribution build, which adds an attribution object to each metric with diagnostic data and is imported from web-vitals/attribution instead of web-vitals. Recent releases also expose the target element in INP attribution.

The attribution build is a little heavier than the standard build, so load the collector after the critical path, for example with a dynamic import() once the page is interactive.

Treat every beacon as hostile input and do as little as possible synchronously.

Recent findings suggest that store one row per metric per page view. Keep it narrow and append-friendly.

Compute p75 per metric, per device class, per route, with a minimum sample size so small groups do not trigger noise.

To find what to fix, group by attribution instead of by route:.

The INP sub-parts tell you where the time went: a long input delay points to main-thread work that was already running (often third-party scripts), long processing points to your event handlers, and long presentation delay points to rendering cost after the handler. For LCP, comparing TTFB, resource load delay, load duration and render delay tells you whether to look at the server, the discovery of the hero image, its size, or render-blocking code. If you need to name the guilty script, the attribution build can also surface Long Animation Frame data, which only reports script entries above 5 ms.

Owning the pipeline lets you catch regressions in hours, not weeks. Every row carries release, so compare the new build with the previous one:.

Compare like with like (same routes, device class and comparable time windows) and include the top attribution targets so whoever is on call starts from a selector, not a dashboard.

When the pipeline lives inside a larger product, such as a multi-tenant store or a customer portal, design it with the rest of your observability stack; that is the kind of work we do in custom software development. For marketing sites, the same principles apply in our website design and development projects.

No. CrUX is built from real Chrome users over a rolling 28-day window; your pipeline uses your own browsers, sampling and windows. Use your data for diagnosis and CrUX as the external reference.

Recent findings suggest that it depends on traffic and how fine-grained your groups are. Pick a rate that lets each vital route and device class clear your minimum sample size, and keep it configurable.

It is a valid shortcut; the web-vitals documentation shows how to send metrics as analytics events. You trade control over dimensions, deduplication and retention for speed of setup.

Originally published on Disruptive Studio.

β†’ Read original article