Documentation
Send events from a backend
Needs an API key — create one under Events.
This one is not a tracker install. It is an authenticated POST from your own server, for the facts a browser must not be trusted to assert — a payment that really settled, a subscription that really cancelled.
It needs an API key, which is scoped to one site and shown exactly once when you create it.
checkout.ts
// Server-side events: things the browser must not be trusted to assert.
await fetch("https://collect.inqetra.com/v1/events", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.INQETRA_API_KEY}`, // inq_live_xxxxxxxxxxxx
},
body: JSON.stringify({
name: "payment",
url: "https://example.com/checkout/success",
visitor: user.id, // hashed at the edge, never stored in the clear
properties: { plan: "pro", amount: 4900, currency: "usd" },
}),
});Worth knowing
9f1c4b2e-7a30-4d51-b8c6-2e5a0d7f3c11 is a placeholder. Yours is issued when you add a domain and is shown in the dashboard next to the snippet.
After it is in
Read server-side events for the full request contract — what the endpoint validates, which names are reserved, and how the rate limit is scoped.