Track a page view
Records a page view. This is the endpoint the tracker script uses in the browser; to send data from a server, use POST /api/v1/events with a secret key.
ApiKeyHeaderX-API-Key<token>The site API key from Site Settings, in the X-API-Key header or as _apiKey in the JSON body. It ships in your tracker snippet, so it isn't a secret: the endpoints also check the page's domain against your allowed domains.
application/json- body
siteId*stringYour site identifier.
pageUrl*stringFull URL of the page being viewed.
pageTitle?stringPage title (document.title).
referrer?stringReferring URL.
visitorId?stringVisitor ID — auto-generated if omitted.
sessionId?stringSession ID — auto-generated if omitted.
userAgent?stringBrowser user-agent string.
screenWidth?integerViewport width in pixels.
screenHeight?integerViewport height in pixels.
language?stringBrowser language (e.g. en-US).
timeZone?stringIANA timezone identifier.
_apiKey?stringSite API key (or send it in the X-API-Key header).
Accepted. stored is false when the hit was dropped, e.g. no consent for an EU/EEA, UK or Swiss visitor.
application/json- response
success?booleantruestored?booleanfalse when the hit was not stored, e.g. a visitor in the EU/EEA, UK or Switzerland without consent.
reason?stringWhy the hit was not stored, e.g. consent_required.
curl -X POST https://wysleap.com/api/telemetry/pageview \ -H "Content-Type: application/json" \ -d '{ "siteId": "your-site-id", "pageUrl": "https://example.com/products", "pageTitle": "Products - Example Store", "referrer": "https://google.com", "visitorId": "vis_abc123", "sessionId": "sess_xyz789", "userAgent": "Mozilla/5.0...", "screenWidth": 1920, "screenHeight": 1080, "language": "en-US", "timeZone": "America/New_York", "_apiKey": "your-api-key" }'{ "success": true}