Custom events and the API
Record signups and purchases, and read your data back out.
Record an event from the browser
The script exposes a single function. Event names are capped at 80 characters and each event may carry up to 12 properties.
window.spx?.('signup', { plan: 'pro' })Record one from your server
Post to the events endpoint with the site token. This is how you record things the browser never sees — a subscription renewing, a refund, an order that completed after checkout.
curl -X POST https://asuito.com/api/v1/event \
-H 'content-type: application/json' \
-d '{"token":"YOUR_SITE_TOKEN","name":"purchase","props":{"amount":49}}'Read your data back
`/api/v1/stats` returns totals for a range, `/api/v1/breakdown` returns any dimension, `/api/v1/search` returns Search Console rows, `/api/v1/mentions` returns brand mentions, and `/api/v1/badge` returns the live counter.
The full schema is at https://asuito.com/openapi.json and https://asuito.com/openapi.yaml. There is also an MCP endpoint at /api/mcp, so an assistant can query your analytics directly.