Pageview Tracking
StorePilot records each page visit and how long the visitor spent on that page.
What Is Tracked
| Data Point | Description |
|---|---|
| URL | Full page URL (path + query string, no hash) |
| Referrer | Previous page URL or traffic source |
| Time on page | Duration from page load until navigation away |
| Visitor ID | Anonymous identifier linking this pageview to a visitor profile |
| Timestamp | When 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:
visibilitychangeevent — when the user switches tabs or minimises the browserpagehide/beforeunloadevent — when the user navigates away
The final duration value is sent to the Platform via a POST /ingest/pageviews request.
Because beforeunload is not reliable on mobile browsers, the time-on-page metric is a best-effort measurement.
Analytics
Pageview data is aggregated in the Dashboard analytics view:
- Pageviews per day — a time-series chart for the selected date range
- Top pages — most visited URLs
- Traffic sources — grouped by referrer domain
- Sessions count — unique visitor sessions in the period
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.