8.6k stars · Apache-2.0 · v6.2.1 (2026-08-26)
~3 KB of JavaScript that measures Core Web Vitals on real visits — the field data behind Unlighthouse's and SiteOne's lab scores.
▶Repo detailsthe review · specs · pros & cons · install
What it is
Google's own tiny library for measuring Core Web Vitals — largest contentful paint, interaction latency, layout shift — in real browsers on real visits. It hands you a number per visit, which you send wherever you like.
Why it matters
Unlighthouse (Ed. 2) and SiteOne Crawler (Ed. 7) both test your site from a fast machine on a good connection — useful, but it is a lab. Editions 6 and 7 then had you install imgproxy and lite-youtube-embed specifically to make pages lighter, and neither of them told you whether it worked for anyone real. This closes that loop: the same visitor who arrives from a YouTube description on a phone on mobile data is the one Google's ranking signals are actually based on. And your product is a React map — the heaviest thing a phone can be asked to render — so the gap between your lab score and your field score is probably larger than average.
- Roughly 3 KB, loads asynchronously, and cannot meaningfully slow the page it measures.
- Sends to anything: an Umami custom event, your own FastAPI endpoint, or a log line. No vendor.
- Maintained by the Chrome team and released monthly — the metric definitions change over time and this library tracks them.
- It is a measurement primitive, not a dashboard. Something has to receive, store and chart the numbers, which is real work (see 05 and 06).
- Field data is noisy at low traffic. With a few hundred visits a month, one person on a train can move your median.
- Chromium-only for some metrics — Safari and Firefox report a subset, which quietly skews an iPhone-heavy audience.
A <script> in your React app's entry point plus a small POST /api/vitals route in FastAPI writing to PostgreSQL — or, with no backend work at all, umami.track('web-vitals', {...}) once Umami exists.