Server-side tracking for custom ecommerce sites and headless stores
A small browser SDK captures what only the browser knows. Your backend sends the order it knows for sure. Both use the same order id, so each purchase counts once everywhere.
Illustration of the event flow
What you get
4.5 KB, first-party
The SDK loads asynchronously from your own tracking subdomain, stores ids in first-party cookies, batches events and resends anything that failed on the next page.
Plain HTTP API
POST /v1/events with a secret key from any language. One event or up to 50 per request, per-event errors, idempotency keys.
Order id identity
Purchases are keyed by order id, so a thank-you page, a server call and a retry are one purchase.
Every ad platform from one call
One event fans out to Meta, TikTok, Snapchat, Pinterest and GA4, each in its own format and hashing rules.
Where browser-only tracking loses the sale
Pick a situation your shoppers are in and watch one order take both paths.
A shopper from your Facebook ad places an order.
Illustration of what happens on shoppers' devices, not a measurement.
Set up in minutes
- 1Paste the snippet on every page (your key is filled in on the Developers page).
- 2Call purchase on the thank-you page, and send the same order from your server with a secret key.
- 3Connect destinations and use Send test event to follow one event to each platform.
Questions
Does it work with single-page apps?+
Yes. Call trakero('page') on route changes; everything else is the same. For bundlers there is an ESM build: import { createTrakero } from "@trakero/browser".
Can I send only server events?+
Yes. Server events work on their own. Add the SDK when you want page views, ad click capture and browser ids for better matching.