Case study
Scheduled Lighthouse scans with long-term metrics in Datadog
Scheduled bulk Lighthouse scans with Unlighthouse on Cloud Run, storing the scores for the legacy and the new storefront in Datadog over time.
Context
The client is a cosmetics retailer that sells through its web store, its app and its own stores. It is moving from Salesforce Commerce Cloud to a headless Next.js platform market by market, so for a while the legacy storefront and the new storefront run side by side.
Our role
We partnered with the client’s architecture team and built the scanner, while the client’s DevOps engineer built the pipeline that deploys and schedules it.
Problem
- The teams needed to compare the legacy storefront with the new storefront, page by page.
- Lab scores were not stored over time, and a single Lighthouse report shows only one moment.
What we did
- Decide. Unlighthouse, which runs Lighthouse on many pages in one job, was chosen over k6, and sitespeed.io was also tested. A static HTML report was dropped, and the data goes only to Datadog.
- Build (January 2026). We built the scanner, which runs in a Docker container as a Cloud Run job and sends the results to Datadog in batches, with a tag for the device. The metrics are the Lighthouse category scores, LCP, CLS, TBT and Speed Index, while the full reports go to a storage bucket.
- Deploy (January 2026). The client’s DevOps engineer built the pipeline, in which GitHub Actions builds the image and Cloud Scheduler starts the job.
- Run. Every 4 hours, the scanner tests about 100 top pages in 4 main markets, on mobile and on desktop, for both the legacy storefront and the new storefront.
- Use. A Datadog monitor sends an alert with a link to the page when performance drops. In the first quarter of 2026, a dashboard with the scores was used in sessions with the legacy team.
- Expand (May 2026). The scan grew to all consumer locales and more page templates, and a view shows the pages with the lowest scores. From then on, the dashboard for non-functional requirements used real user data (RUM) for Core Web Vitals, while the scan kept the performance, accessibility and SEO scores.