Skip to main content

Events API

Use the Events API for backend-side events, webhook conversions or systems where browser tracking is not reliable.

Endpoint

POST https://purestats.io/api/event
Content-Type: application/json

Example payload

{
"domain": "example.com",
"name": "Payment Completed",
"url": "https://example.com/checkout/success",
"path": "/checkout/success",
"referrer": "https://example.com/pricing",
"props": {
"plan": "pro",
"billing_cycle": "annual"
}
}

Validation

The API validates:

  • Domain or alias.
  • URL and path format.
  • Quota state.
  • Bot or spam signals.
  • Payload size.
  • Required fields.

Invalid payloads are rejected and should not enter analytics tables.

Authentication

Browser tracker calls rely on domain validation. Server-side integrations should use configured API credentials when available for your deployment.

Retry behavior

For important backend events, retry temporary failures with backoff. Do not retry validation errors without changing the payload.