Skip to main content
Use the Events endpoint to track conversions and actions that happen on your server — payment confirmations, email opens, webhook callbacks, and any other event that occurs outside the browser — and surface them alongside your pageview data in the TinyTrack dashboard. Because you’re calling the API directly from your backend, there’s no need to load the TinyTrack browser script for these events.

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 props to capture metadata like payment amounts, plan names, or referral codes. Example:
Avoid including personally identifiable information (names, email addresses, IP addresses) in props — this preserves TinyTrack’s privacy guarantees for your users.

Example Request

Example Successful Response (HTTP 202)

The API responds with HTTP 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.succeeded webhook).
  • 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).
Use browser-side events when:
  • 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.
You can mix both approaches freely within the same site — they appear together in your TinyTrack Goals & Funnels view.
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

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)
Fire a signup event from your registration endpoint after creating the user record:
Python (Flask)