Pageview Tracking

Automatic tracking of page visits and navigation.

How It Works

Palace Tracker automatically tracks pageviews when the page loads. No additional code is required beyond the initial installation.

Each pageview event includes the following data:

  • URL - The current page URL
  • Referrer - The previous page URL (only external referrers)
  • Hostname - The website domain
  • Language - Browser language
  • Screen size - Device screen resolution
  • User agent - Browser information

Single-Page Applications

Palace Tracker automatically detects navigation in single-page applications (SPAs) by monitoring the History API (pushState and replaceState).

When the URL changes via the History API, a new pageview is automatically tracked after a 300ms delay. No additional configuration is needed for frameworks like React, Vue, or Angular.

Referrer Tracking

The tracker only captures external referrers (from different hostnames). Internal navigation within your site does not update the referrer, ensuring accurate traffic source attribution.

The original external referrer is maintained throughout the user's session, even as they navigate between pages on your site.