Skip to main content
Historically, Lighthouse analyzed the cold page load of a page. Starting with Lighthouse v10, it can analyze and report on the entire page lifecycle via user flows. You might want flows if:
  • You want to run Lighthouse on your whole web app, not just the landing page.
  • You want to verify that all parts of an experience are accessible (e.g. a checkout process).
  • You want to measure Cumulative Layout Shift across an SPA page transition.

The three modes

Lighthouse runs in three modes. Each has distinct use cases and limitations. A flow is built by combining them.
Navigation mode analyzes a single page load. It is the default mode — all Lighthouse runs prior to v9.6.0 were essentially navigations.Use cases:
  • Obtain a Lighthouse Performance score and all performance metrics.
  • Assess Progressive Web App capabilities.
  • Analyze accessibility immediately after page load.
Limitations:
  • Cannot analyze form submissions or single-page app transitions.
  • Cannot analyze content that isn’t available immediately on page load.
When you provide a callback instead of a URL, Lighthouse cannot clear Service Worker and Cache Storage (since it doesn’t know the URL in advance). This generally reflects the real user experience. If you need to clear storage manually, do so inside the callback.
Chrome DevTools supports individual Navigation, Timespan, and Snapshot runs, but does not support combining multiple steps into a single multi-step user flow report. To create a multi-step flow, use the Node API as shown below.

Creating a flow

A flow is created by calling startFlow(page) with a Puppeteer Page object. You then call flow methods (navigate, startTimespan/endTimespan, snapshot) in sequence to build up the steps.
After all steps are recorded, generate the report:

Complete flow example

The example below models a user flow for an e-commerce site: navigate to the homepage, search for a product, snapshot the results, and navigate to the detail page.
The resulting report summarizes all steps and lets you drill into each phase individually.

Desktop user flow

Use the built-in desktopConfig to score and emulate a desktop environment:

Inheriting Puppeteer’s viewport settings

If Puppeteer is already configured with a specific viewport, disable Lighthouse’s own screen emulation to avoid overriding it:

Tips and tricks

Record each timespan around a single interaction sequence or page transition. Shorter recordings are easier to debug and produce more actionable results.
If the user action causes a full page navigation (URL change, form POST, etc.), use flow.navigate() or startNavigation/endNavigation rather than capturing it inside a timespan.
Reach for snapshot mode when a substantial portion of the page content has changed — for example, after a multi-step wizard advances to the final confirmation screen.
Always wait for page transitions and async operations to settle before calling flow.endTimespan(). Puppeteer helpers like page.waitForSelector, page.waitForFunction, page.waitForResponse, and page.waitForTimeout are useful here.