PilotFoxDocs

Record a tracker event

POST
/api/e

What the tracker sends for each pageview, custom event, autocaptured interaction, error and web vital. No credential: the body names the site, and the visitor is derived from the request's IP address and User-Agent (behind a first-party proxy, from the X-PilotFox-IP its proxy secret vouches for), never from a cookie. 204 whether the event was stored or dropped; 400 for a malformed body or proxy secret, 404 for an unknown site, 413 past the size limit (INGEST_MAX_BODY_BYTES), 429 past the per-client rate limit. Server-side code sends POST /api/v1/ingest/events with an API key instead.

Request Body

  1. body
site*string
Length1 <= length
type*string
Value in"pageview""event""outbound""click""form""input""copy""error""vital"
url*string
Length1 <= length
ref?string
title?string
name?string
props?unknown
sw?number
sh?number
lang?string
uid?string
tag?string
vitals?
err?
bs?number
bm?number
aid?string

Response Body

Taken, or dropped by the site's exclusions or bot rules: ingest never says which

Example Request
curl -X POST 'https://pilotfox.app/api/e' \  -H 'Content-Type: application/json' \  -d '{  "site": "string",  "type": "pageview",  "url": "string"}'
Example Response204
Empty