Shahin

Virtual Pageview

Intermediate
Updated Jul 11, 2026 Shahin editorial 2 min read
PronunciationEN/ˈvɜːrtʃuəl ˈpeɪdʒvjuː/

A virtual pageview is a pageview recorded manually with JavaScript instead of by a real page load; a way to count navigation where the browser does not reload the page.

A virtual pageview is the direct solution to the problem single-page apps create: because internal navigation has no fresh load, the script must itself detect that the user moved to another “page” and record a view. Its mechanic is listening for the URL change in the browser. But it has two traps. First, over-counting: if the script counts every minor URL change (like a filter parameter or anchor change) as a new view, the pageview stats inflate artificially; there must be a clear definition of a “page.” Second, timing: the virtual view must be recorded after the content actually changes, not before, or the recorded URL and content will not match. A correct virtual pageview restores the pages, paths and funnel reports in an SPA to the same accuracy as a multi-page site.