Drupal Module

Core Web Vitals PageSpeed for Drupal

Real speed for real visitors. Measure LCP, INP and CLS where Google measures them, fix what slows your site down, and check every change before your visitors see it.

Last Update: 15 Nov 2026
Version: 2.0.0
Compatibility: Drupal 10.3 and 11 (tested on 10.3 and 11.4), PHP 8.1 or newer (tested on 8.2 and 8.4), MySQL or MariaDB. Drupal 11.0 to 11.3 are expected to work. Drupal 12 is not supported yet.

Why Core Web Vitals matter

Google ranks pages by the Core Web Vitals of real Chrome users: how fast the main content appears (LCP), how quickly the page reacts to clicks and taps (INP) and how stable the layout is (CLS). A good PageSpeed score in a lab test does not help if real visitors still wait. This module works with the numbers that count: the speed of your real visitors.

What it does

  • Measures real visitors. LCP, INP, CLS, FCP and server response time of real page loads, mobile and desktop, the last 28 days. You see the slowest pages and the exact element that is slow.
  • Applies safe improvements. Loads the main image first, lazy-loads images and frames below the first screen, loads YouTube and Vimeo players on click, reserves space for images, shows text while fonts load, connects early to font and script servers and minifies the HTML of the page. Deferring scripts is there as well; it stays off until you turn it on and check it in the preview.
  • Tests with Google. Runs PageSpeed Insights from your administration area and compares the draft with the published settings, so you see the effect before you publish.
  • Checks your server and site. PHP version, OPcache, CSS and JavaScript aggregation, Twig debug mode, the Internal Page Cache, Dynamic Page Cache and BigPipe, Redis and other cache back ends, Varnish or a CDN in front of the site, cron, the server response of real visitors, file permissions and whether the site can send email.

Safe by design

  • Every change is a draft first. You check it in a preview on your own site and with PageSpeed Insights; your visitors still get the published settings.
  • Publish when you are sure. Every published version is kept, and any of them is one click away. One button turns every optimization off.
  • Switches that can affect scripts or the layout are marked "Check preview".
  • The module never changes what Google sees compared to what people see: crawlers and visitors get the same page.
  • By default only the pages that anonymous visitors get are changed and measured, the pages Drupal keeps in its page cache. Logged-in users get the page exactly as Drupal makes it, unless you turn on "Optimize pages for logged-in users" or "Measure logged-in users too" in Settings (both are off by default). The administration area, the user pages (login, account), forms that are sent and the cart, checkout and payment pages of Drupal Commerce are never optimized and never measured, whatever the settings say.
  • Works with the Internal Page Cache, the Dynamic Page Cache and BigPipe. A change you publish refreshes the pages Drupal keeps, without clearing the whole cache.
  • Works with Olivero, Claro, Gin, Stable and child themes. With other themes check the preview first.

Private by design

Speed numbers stay on your own site. No cookies, no IP addresses, no personal data, nothing is sent to other servers. The page address is kept without its query string, for up to 28 days.

Free and Pro

Free Core Web Vitals PageSpeed
Core Web Vitals PageSpeed Pro
Real visitor measurements Whole site, 28 days
What to blame (LCP, CLS, INP elements) Top 5 for the site
PageSpeed Insights tests Manual, last 20 tests
Safe optimizations, preview and rollback YES
Delay third-party scripts until the first interaction -
Host Google Fonts locally -
Engineer tools: critical CSS per page type, libraries left out per page, HTML rules -
Journal of changes with notes Last 10 versions

Pro is an add-on to the free module. Plans for 1, 5 and 25 sites.

After the purchase, download the Pro add-on in your SiteGuarding account, install it next to the free module and enter your licence key on its Pro screen.

Need it done for you?

Some problems need a developer: a heavy theme, a slow module, a server that answers late. Our engineers review your site, fix the slow parts by hand and check the result on real visitor data. Order a performance audit or get a quote for a full fix.

FAQ

Does it replace a cache?

No. It works together with the Internal Page Cache, the Dynamic Page Cache, BigPipe and with Varnish or a CDN in front of the site. For a fast server response keep the page caches on.

Will it break my site?

Every change is a draft until you publish it, and you can check it in a preview first. Rollback is one click. The administration area, user pages, forms and the checkout are never touched, and logged-in users get the page as Drupal makes it unless you turn that on.

Do I need a Google API key?

Only to run PageSpeed Insights tests from the administration area. The key is free. Real visitor measurements and all optimizations work without it.

What data does it collect?

Speed numbers of page loads, the page address without its query string, the page type and whether the screen is mobile or desktop. No cookies, no IP addresses, no personal data.

Does it work behind Varnish or a CDN?

Yes. When you publish, the pages that Drupal keeps are refreshed at once. A reverse proxy in front of Drupal is refreshed at once only if the Purge module is installed for it; without it the proxy keeps the old pages until they expire. The Diagnostics screen tells you which of the two applies.

Does it work with several sites or domains?

Yes. A multisite installation has its own settings and its own numbers for each site. The Pro licence works on the domain of the site where you enter it.

Which Drupal versions are supported?

Drupal 10.3 and 11, tested on 10.3 and 11.4 with PHP 8.2 and 8.4. Drupal 11.0 to 11.3 are expected to work. Drupal 12 is not supported yet.

Which database does it need?

MySQL or MariaDB.

Can I remove it?

Yes. The Settings screen has a "Delete all data now" button, and Extend > Uninstall removes the module with its tables, its saved values and its data folder. Nothing of it stays on the site. If you use Pro, uninstall Pro first.

Requirements

Drupal 10.3 or 11 (tested on 10.3 and 11.4), PHP 8.1 or newer (tested on 8.2 and 8.4), MySQL or MariaDB. Access to the files of the site (the modules folder) and, to install, an administrator of the site. Pro also needs the PHP sodium extension, which PHP has built in.

Download

Free, no account needed. One file for Drupal 10.3 and 11.

Installation

Unpack the archive into the modules folder of the site, so that the folder is modules/sgcwv (or modules/custom/sgcwv; on a site managed with Composer use modules/custom or web/modules/custom). Then enable the module:

In the administration area: Extend, tick Core Web Vitals PageSpeed for Drupal and press Install.

Or with Drush:

cd <your Drupal folder>/web/modules
unzip drupal-core-web-vitals-pagespeed.zip
drush en sgcwv -y
drush cr

Then open Configuration > Development > Core Web Vitals PageSpeed. Real visitor measurements start at once. To speed up the site, put the recommended safe set in a draft, check it in the preview and publish.

Pro: unpack the Pro add-on the same way (the folder sgcwv_pro), enable Core Web Vitals PageSpeed Pro in Extend (Drupal refuses it without the free module) and enter your licence key on the Pro screen.

Updates

The module shows a notice on its Overview screen when a new version is out, with the download link, its SHA-256 and the steps. Nothing is downloaded or installed by itself.

1. Download the new file and replace the module folder with the new one.

2. Clear all caches (drush cr, or Configuration > Development > Performance > Clear all caches) and open the page of the module. There is no database update to run.

3. Settings and measurements stay.

Pro shows a new version on its Pro screen with a "Get version" button and the same steps. Pro updates come with an active licence.

Changelog

2.0.0
New module: real visitor Core Web Vitals, safe optimizations with draft, preview and rollback, PageSpeed Insights tests and speed diagnostics.

Live Chat Support
Our website uses cookies, which help us to improve our site and enables us to deliver the best possible service and customer experience. See our policy Accept