phantomas
phantomas copied to clipboard
Report Google's Web Vitals metrics
-
https://web.dev/vitals/
-
Largest Contentful Paint (LCP): measures loading performance. To provide a good user experience, LCP should occur within 2.5 seconds of when the page first starts loading.
-
First Input Delay (FID): measures interactivity. To provide a good user experience, pages should have a FID of 100 milliseconds or less.
-
Cumulative Layout Shift (CLS): measures visual stability. To provide a good user experience, pages should maintain a CLS of 0.1. or less.
<!-- Append the `?module` param to load the module version of `web-vitals` -->
<script type="module">
import {getCLS, getFID, getLCP} from 'https://unpkg.com/web-vitals?module';
getCLS(console.log);
getFID(console.log);
getLCP(console.log);
</script>
https://github.com/GoogleChrome/web-vitals#install-and-load-the-library