Skip to main content

Pageview Tracking

StorePilot records each page visit and how long the visitor spent on that page.

What Is Tracked

Data PointDescription
URLFull page URL (path + query string, no hash)
ReferrerPrevious page URL or traffic source
Time on pageDuration from page load until navigation away
Visitor IDAnonymous identifier linking this pageview to a visitor profile
TimestampWhen the pageview occurred

IP addresses are not stored. Geolocation (country, city) is resolved at ingest time and the raw IP is discarded.


Time-on-Page Measurement

When a page loads, a start timestamp is recorded. The duration is sent in one of two ways:

  1. visibilitychange event — when the user switches tabs or minimises the browser
  2. pagehide / beforeunload event — when the user navigates away

The final duration value is sent straight to the Platform as an update to the pageview already recorded — it never passes through the shop's WordPress server, and since plugin 1.31.0 neither does an anonymous visitor's pageview itself (see WordPress Proxy).

Because beforeunload is not reliable on mobile browsers, the time-on-page metric is a best-effort measurement.


Analytics

Pageview data is aggregated on the Analytics screen:

  • Pageviews & errors — both as daily series on one chart
  • Top pages — the ten most-visited paths, with average time on each
  • Countries, Devices, Browsers, Operating systems — who visited
  • Bounce rate — sessions with exactly one pageview

There is deliberately no traffic-source or referrer grouping yet: grouping traffic by channel needs the referring URL stored per pageview, and it is not. UTM parameters survive in the page URL and can be read there, but they are too partial a signal to publish as a channel breakdown.


Excluded Pages

The following are excluded from tracking automatically:

  • WordPress Admin pages (/wp-admin/)
  • Login page (/wp-login.php)
  • Requests from logged-in administrators (if configured)

Single-Page Application (SPA) Compatibility

For WordPress themes that use client-side routing (e.g. Headless WordPress + Next.js), the tracker listens for popstate and hashchange events to detect navigation without a full page reload. Each navigation fires a new pageview event.