Wendung.page() to record a pageview for the current URL. With trackPageviews: true or 'auto' in init() the SDK calls it for you on the initial load and on every pushState, replaceState, and popstate, so most apps never call it directly. Use it when tracking is off and you want to record specific pages, or when your router changes the URL without the history API.
With granted consent, the first pageview of a page load carries document.referrer. Every later pageview carries the previous pageview’s URL as its referrer, so entry pages and internal navigation are told apart in reports.
While consent is pending, page() records an aggregate pageview only with trackPageviews: 'auto'. It omits identifiers, query parameters, fragments, title, and screen size, and restricts referrers to their origin. Otherwise pending or denied consent drops the call.
Throws if called before init().
Parameters
None. The SDK reads the page context at call time. The fields depend on the consent state, as described above.Returns
void
Examples
Manual pageviews with tracking off
A router that bypasses the history API
Each collected pageview queues one
$pageview event that counts against your monthly pageview allowance. Calling page() on a navigation the SDK already observed records the page twice.