This project is not covered by Drupal’s security advisory policy.
Core Web Vitals PageSpeed shows how fast your Drupal site is for real visitors and makes it faster in safe steps: every change goes into a draft first, you check it in a preview that only you see, then you publish it. Any published version can be restored with one click. It is made by SiteGuarding.com, a website security and performance company.
Open Configuration > Development > Core Web Vitals PageSpeed: the Overview shows the Core Web Vitals of your real visitors and the next steps.
Features
- Real visitor measurements: LCP, INP, CLS, FCP and the server response time of real page loads, mobile and desktop, for the last 28 days. You see the slowest pages and the exact element that is slow. The numbers stay on your site: no cookies, no IP addresses, no personal data.
- Safe optimizations: load the main image first, lazy-load images and frames below the first screen, load YouTube and Vimeo players on click, reserve space for images, show text while fonts load, connect early to other servers, minify the HTML. Deferring scripts is there too; switches that can affect scripts or the layout are marked "Check preview".
- Draft, preview and rollback: changes go to a draft, you see the draft on your own site (and with PageSpeed Insights) while visitors still get the published settings; earlier versions are kept and can be restored, and one button turns every optimization off.
- PageSpeed Insights tests of the draft and of the published settings from the administration area, with what to fix.
- Speed diagnostics: the PHP version and OPcache, CSS and JavaScript aggregation, Twig debug and development modules, the Internal Page Cache, the Dynamic Page Cache and BigPipe, whether pages are really kept by the page cache, the browser cache time, a reverse proxy or CDN in front of the site, compression, cron and the server response of real visitors.
- Works with the Internal Page Cache, the Dynamic Page Cache and BigPipe: a published change refreshes the pages Drupal keeps without clearing the whole cache. Search engines and people get the same page.
Post-installation
Turn the module on and open Configuration > Development > Core Web Vitals PageSpeed. Access is controlled by the "Administer Core Web Vitals PageSpeed" permission.
The web-vitals library. The real visitor measurements use the web-vitals library of Google (Apache-2.0 license), which this project does not include. Download web-vitals 6 and put its file dist/web-vitals.attribution.iife.js at libraries/web-vitals/web-vitals.attribution.iife.js in the web root of the site (with Composer and asset-packagist, npm-asset/web-vitals in libraries/web-vitals/ works too). Until then no visitor is measured and the module screens say so; the optimizations, the PageSpeed tests and the diagnostics work.
By default only the pages that anonymous visitors get are optimized and measured. The administration area, the login and account pages and the cart, checkout and payment pages of Drupal Commerce are never touched.
The module sends nothing to SiteGuarding.com. PageSpeed Insights tests are sent to Google only when you start them, with your own free API key. Offers of SiteGuarding (the services of our engineers) are off by default; you can switch them on under Settings > Offers of SiteGuarding.
Additional requirements
Drupal 10.3 or 11, PHP 8.1 or newer, MySQL or MariaDB. The web-vitals library (version 6) for the real visitor measurements, see above. A free PageSpeed Insights API key of Google for the tests from the administration area.
Similar projects
- Lazy-load: lazy-loads images and iframes with the lazysizes library, set per image formatter and text format. This module uses the native lazy-loading of the browser on the whole page, keeps the main image and the first images out of it, and measures the result.
- Blazy: lazy loading for images, iframes and media, enabled per field formatter, text filter, View or layout. This module works on the finished page of any theme and adds real visitor measurements, a draft with a preview and a rollback.
- Quicklink: prefetches the links in view, so the next page opens faster. It works together with this module, which speeds up the first view of a page.
- Swoosh: sends real user Core Web Vitals to the Swoosh service. This module keeps the measurements on your own site and shows them in the administration area.
Supporting this module
Core Web Vitals PageSpeed is made by SiteGuarding.com. Questions and problems: please use the issue queue of this project, or write to SiteGuarding support.
Project information
- Project categories: Administration tools, Performance
- Created by siteguarding on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
Releases
First release on drupal.org





