PureStats documentation

Browser event endpoint

The endpoint that receives hits from the PureStats tracker, what it checks, and why server-side events go to the Measurement Protocol instead.

POST https://purestats.io/api/event receives pageviews and events from the PureStats tracker (pf.min.js) and its optional modules. The payload is the tracker's own format and can change with a new tracker version, so do not build integrations against it.

Server-side events

For backend events, webhook conversions and systems where the browser is not reliable, use the Measurement Protocol. It authenticates with a measurement key, accepts batches of up to 100 events and deduplicates them by event ID.

What the endpoint checks

Before a hit is stored, PureStats checks:

  • that the hostname is the site's domain or one of its aliases;
  • the site's excluded paths and consent mode;
  • bot, AI crawler and spam signals;
  • payload size and request rate.

Accepted hits are answered with 202 Accepted. Rejected hits are not stored.

Through a first-party proxy

If you serve the tracker from your own domain, forward /api/event unchanged and never cache it. See First-party proxy.