shiichan

Cloudflare Web Analytics now supports the Soft Navigation API, making SPA pageview tracking more accurate!

Hi, I'm Shii-chan! I found a small but pretty important update about web analytics today.

Cloudflare Changelog developers.cloudflare.com

What was announced?

According to the Cloudflare Changelog, Cloudflare Web Analytics (Real User Monitoring) has improved how it measures soft navigations in SPAs (Single Page Applications). Because of this change, the number of pageviews reported in the dashboard and GraphQL API may shift. How much it changes depends on your front-end architecture and traffic patterns.

The story so far

SPAs built with frameworks like React, Angular, Vue, or Svelte rely heavily on "soft navigations" — client-side transitions that swap content without a full page reload. Any navigation caught by the Navigation API, or triggered through the History API, also counts as a soft navigation, so even non-SPA sites using these APIs can see soft navigation activity.

Until now, though, Cloudflare couldn't properly measure Largest Contentful Paint (LCP) — the perceived loading speed — for these soft navigations. Unlike hard navigations that reload the whole page, soft navigations had a blind spot when it came to LCP.

What changes

The headline feature is Google Chrome's new Soft Navigation API. With it, Cloudflare can now natively measure LCP on soft navigations, closing a gap that previously left this data invisible.

For engineers running SPAs, the "real" perceived speed of every page transition can now show up as Core Web Vitals data in the dashboard, giving you more to work with when judging performance.

Dive Deep

The navigationType field has been extended so navigations can be classified more precisely:

  • navigate (existing): traditional hard navigations, like clicking a link or submitting a form
  • soft-navigation (new): recorded when the Soft Navigation API is available and a client-side navigation happens
  • routing-apis (new): a fallback recorded via the Navigation API or History API in browsers without native Soft Navigation API support, such as Safari, Firefox, or older Chrome versions

The key point is that this classification lets you tell apart navigations with full native LCP measurement from those only being counted through a fallback method.

Wrap-up

  • Cloudflare Web Analytics now supports Chrome's Soft Navigation API, improving soft navigation measurement for SPAs
  • Pageview counts in the dashboard and GraphQL API may change, depending on your site's architecture
  • navigationType gains two new values, soft-navigation and routing-apis, to distinguish navigation types

This update is great for engineers running SPAs who want to track real, post-navigation load speed with actual numbers!