Updated

Technology · Analytics

web-vitals

github.com
Open source

web-vitals is a small, modular JavaScript library that measures the Web Vitals metrics on real users. It is built to match how Chrome measures them.[1]

The web-vitals JavaScript library is a lightweight, modular tool for measuring all key web vitals metrics on real users. This includes metrics like Largest Contentful Paint (LCP), First Input Delay (FID), and Cumulative Layout Shift (CLS), which are essential for understanding and optimizing user experience on the web. By capturing real-user performance data, web-vitals helps developers ensure their websites meet industry performance standards and deliver a smooth, responsive experience.

web-vitals belongs toJavaScript librariesRUMcategories.

What it measures

All the Core Web Vitals plus other metrics[1]

Where it runs

In the visitor's browser, from npm or a script tag[1]

License

Free under the Apache 2.0 license[1]

Browsers

Tested in Chrome, Firefox and Safari[1]

73websites

use it — 2.9% of the 2,555 websites we scanned in the last 12 months

#16of 124

tools in its category seen in our scans (we recognize 278)

9public pages

on UptimeCard — open any of them to see how that site is doing

In short: a free way to collect Web Vitals from real visitors and send them to your own analytics. Layout shift reporting works only in Chromium browsers.[1]

2.35% of all websites we track run web-vitals▼ 0.01 points since 20 Sep

Should you use web-vitals?

The 10-second version, from the vendor’s own pages and what we see in our scans

web-vitals fits if…

  • You want field data from your own visitors rather than a one-time test[1]
  • You want to send the numbers to an analytics endpoint you control[1]
Some metrics are available only in some browsers[1]
Interaction to Next Paint is not reported if the visitor never interacts with the page[1]

Support and help for web-vitals

How the vendor says you can reach it, and the public help community

Stack Overflow

57 questions[5][6]

65% have an upvoted answer. [web-vitals] questions

web-vitals versions

The newest release, the series that still gets fixes, and what changed

Latest release

6.2.3[4][3]

Released 5 Oct 2026

Maintained series

6

What changed in 6

  • The sixth major version adds Soft Navigation support when the browser provides it[3]
  • The sixth major version reports small INP interactions after a back/forward cache restore[3]

What changed in 5

  • The fifth major version removed the deprecated First Input Delay function[3]
  • The fifth major version tied browser support to Baseline Widely available[3]

What changed in 4

  • The fourth major version added INP breakdown timings and Long Animation Frame attribution[3]

What web-vitals sites add on top

How many of the 73 web-vitals sites we scanned also run each tool, grouped by what the tool does

Tag manager

Google Tag Manager
71%52 sites

Analytics

Google Analytics
67%49 sites
Facebook Pixel
21%15 sites

Cookie consent

OneTrust
25%18 sites
Funding Choices
12%9 sites

Online store

Cart Functionality
19%14 sites

The full bar means every web-vitals site. A site can run several tools for one job, so the shares of tools in one group can add up to more than 100%.

How web-vitals sites protect themselves

Share of the 73 sites we scanned that run each protection

HSTS73% · 53 sites

HTTP Strict Transport Security (HSTS) informs browsers that the site should only be accessed using HTTPS

reCAPTCHA23% · 17 sites

reCAPTCHA is a free service from Google that helps protect websites from spam and abuse

Cloudflare Bot Management12% · 9 sites

Cloudflare bot management solution identifies and mitigates automated traffic to protect websites from bad bots

Protections add up, they do not replace each other: a site can run all of them.

At a glance

UptimeCard's own scans and tests of 2,555 websites · refreshed weekly

How web-vitals sites scoreout of 100 · hover or tap a score for details

35PerformancePooraverage site: 5093AccessibilityGoodaverage site: 8992Best practicesGoodaverage site: 9392SEOGoodaverage site: 92

Page load time

Loads about as fast as the average site

web-vitals sites
4.0 s
All sites
4.3 s

Most web-vitals sites load in 3.5–6.9 s. Home page weight: 4.1 MB vs 3.3 MB for all sites. 7 public sites measured.

Who uses it?

Technology and Software is the biggest group

Technology and Software56%
Business Services11%
Educational Resources11%
Fintech Solutions11%

Share of 9 classified public sites. “× average” compares with all 961 public sites.

How web-vitals sites are built

Closest partners. The number says how many times more often the tool runs on web-vitals sites than on an average website. Hover a partner for its share of sites.

Unpkg9×Drupal4×Envoy3×Google Sign-in3×Prebid3×Lodash2×GSAP2×Akamai2×Funding Choices2×

Stacks we see most. Tools that tend to run together with web-vitals on the same websites. The percentage is the share of all 73 web-vitals sites that run the whole stack.

15 stacks · swipe, drag or use the arrows
#1

web-vitals + React + DigiCert

11%8 of 73 sites
#2

web-vitals + Unpkg + Amazon CloudFront + AWS Certificate Manager

8.2%6 of 73 sites
#3

web-vitals + DigiCert + OneTrust

9.6%7 of 73 sites
#4

web-vitals + React + styled-components

9.6%7 of 73 sites
#5

web-vitals + React + Amazon CloudFront

8.2%6 of 73 sites
#6

web-vitals + Unpkg + React + OneTrust

5.5%4 of 73 sites
#7

web-vitals + Unpkg + Microsoft Advertising + Akamai

5.5%4 of 73 sites
#8

web-vitals + DigiCert + Akamai

6.8%5 of 73 sites
#9

web-vitals + OneTrust + Akamai

6.8%5 of 73 sites
#10

web-vitals + OneTrust + GSAP

6.8%5 of 73 sites
#11

web-vitals + Funding Choices + Prebid

6.8%5 of 73 sites
#12

web-vitals + Unpkg + DigiCert

5.5%4 of 73 sites
#13

web-vitals + Google Sign-in + Funding Choices

5.5%4 of 73 sites
#14

web-vitals + Microsoft Advertising + Twitter Ads

5.5%4 of 73 sites
#15

web-vitals + Akamai + Adobe Experience Platform Launch

5.5%4 of 73 sites

Websites using web-vitals

73 websites use web-vitals: 2.9% of the 2,555 websites we scanned in the last 12 months. A selection is shown below.

Scores are out of 100: P Performance · A Accessibility · B Best practices · S SEO. Green 80+, yellow 65–79, orange 50–64, red below 50. The dot shows whether our last scan found the site failing (red) or not (green); Red, amber or blue: an active incident on the site's status page (outage, degraded, maintenance) or a failing scan; amber also means a certificate ending within 30 days. Hover the dot for details.

Who is behind web-vitals

From its own pages and public records, with sources

web-vitals

since 2020[7]

Its story

  1. 2020

    The first pre-release appeared in April 2020. It gave site owners a small script for collecting the Web Vitals metrics from real visitors, instead of relying on lab tests.[3][1]

  2. 2020

    The first stable release added metric reporting after a back/forward cache restore. Pages restored from that cache could now be measured like fresh loads.[3]

  3. 2021

    The second major version changed Cumulative Layout Shift to a session-window method and reported it only if the page was visible. Layout shift numbers followed the updated metric definition.[3]

  4. 2022

    The third major version added support for the new Interaction to Next Paint metric and a rating on each metric. Developers could start measuring the successor to First Input Delay and see good, needs-improvement or poor at a glance.[3]

  5. 2024

    The fourth major version added INP breakdown timings and Long Animation Frame attribution, and deprecated First Input Delay. Developers could find which part of an interaction was slow before INP became a Core Web Vital that year.[3][2]

  6. 2025

    The fifth major version removed the deprecated First Input Delay function and moved browser support to Baseline Widely available. Sites still calling it had to switch to Interaction to Next Paint.[3]

  7. 2026

    The sixth major version added Soft Navigation support where the browser provides it. Single-page apps could be measured per route change instead of only per full page load.[3]

Questions about web-vitals

What is web-vitals?
A small, modular JavaScript library that measures the Web Vitals metrics on real users.[1]
Which metrics does it support?
All of the Core Web Vitals: Cumulative Layout Shift, Interaction to Next Paint and Largest Contentful Paint. It also reports First Contentful Paint and Time to First Byte.[1]
Is web-vitals free?
Yes. It is released under the Apache 2.0 license.[1]
Why does the library not report First Input Delay any more?
Interaction to Next Paint became a stable Core Web Vital in 2024 and replaced First Input Delay, and the fifth major version of the library removed the deprecated First Input Delay function.[2][3]
How many websites use web-vitals?
We found web-vitals on 73 of the 2,555 websites we scanned in the last 12 months (2.9%). 9 of them have a public status page.
What is web-vitals often used with?
Among the websites we scan, web-vitals is often found alongside Amazon Web Services (35.6% of its sites), Unpkg (35.6% of its sites), React (34.2% of its sites).
What are the alternatives to web-vitals?
Other javascript libraries tools we recognize include jQuery, core-js, Swiper, jQuery Migrate.

Is your website built with web-vitals?

UptimeCard checks it around the clock, tells you the minute it stops answering, and gives your visitors a status page.