Send an Event
Record a custom event for a tracked site.POST /v1/events
Request Body Parameters
string
required
The unique ID of the site to associate this event with. Obtain this from GET /v1/sites.
string
required
The name of the event (e.g.
payment, signup, trial_started). Use short, descriptive, lowercase names with underscores. This name appears exactly as you provide it in your TinyTrack Goals & Funnels dashboard.string
required
The full URL where the event occurred (e.g.
https://blog.acme.dev/checkout/confirm). Include the protocol and domain — TinyTrack uses this to attribute the event to the correct page in your dashboard.object
An optional object of custom key-value pairs to attach to the event. Both keys and values must be strings or numbers. Use Avoid including personally identifiable information (names, email addresses, IP addresses) in
props to capture metadata like payment amounts, plan names, or referral codes. Example:props — this preserves TinyTrack’s privacy guarantees for your users.Example Request
Example Successful Response (HTTP 202)
202 Accepted rather than 200 OK because the event is queued for asynchronous processing. { "accepted": true } means the event has been received and will appear in your dashboard within a few seconds.
Server-Side vs. Browser-Side Events
TinyTrack supports two complementary ways to track events:
Use server-side events when:
- The action happens on your server and there is no user browser session in play (e.g. a Stripe
payment_intent.succeededwebhook). - You want to guarantee the event is captured regardless of ad blockers or browser settings.
- You are tracking automated or system-level processes (e.g. a nightly email digest being sent).
- You need to capture user interactions in real time (e.g. a “Get Started” button click or a checkout step).
- The event is tied to a specific page and user action that the browser script can observe naturally.
Server-side events do not automatically include the visitor’s IP address or user-agent, so they appear with no location data in your dashboard. If location attribution matters for a specific event, fire it from the browser using the
t.js script instead.Common Use Cases
Stripe payment webhook
Stripe payment webhook
Call
POST /v1/events inside your Stripe webhook handler after verifying the signature. Pass the payment amount and currency in props so you can filter payments by value in the dashboard.JavaScript (Node.js / Express)
New user signup
New user signup
Fire a
signup event from your registration endpoint after creating the user record:Python (Flask)