Trakero
Integrationavailable

Server-side conversion tracking for Next.js and Node.js stores

Headless and custom storefronts know the order for sure on the server. One call sends it to every ad platform, with the browser's ad click, GA ids and visitor id read from the request's cookies.

Next.js / No…Browser SDKTrakerodedup · hash · retryMeta CAPITikTokGA4

Illustration of the event flow

What you get

One call per order

trakero.purchase({ orderId, value, currency, items, customer, shopper }) sends event purchase_{orderId}, the same id the browser SDK uses.

shopperFromRequest(req)

Reads IP, user agent and the first-party cookies (fbc, fbp, ttclid/_ttp, _scid, _epik, GA client and session) from any Fetch API request.

Safe retries

429, 5xx and network errors retry with backoff and an idempotency key, so a retry is never a second purchase.

Typed and small

TypeScript types, ESM, no dependencies, Node 18+, Edge runtimes with fetch.

Where browser-only tracking loses the sale

Pick a situation your shoppers are in and watch one order take both paths.

yourstore.com/checkout/thanksuBlock Origin · 3 requests bloOrder #10231Red dress × 2 · ৳2,580✓ confirmed · CODPlace order123456789🍪_fbc · 7-day cap✕ tab closed🖥️Your store's serverorder.status → paid✕ad blockerTrakeromerge · hash · dedupMeta · via PixelblockedMeta · via CAPI202 · delivered once

A shopper from your Facebook ad places an order.

✕ Browser Pixel: blocked✓ Trakero: delivered once

Illustration of what happens on shoppers' devices, not a measurement.

Set up in minutes

  1. 1Add the browser snippet to your layout so the first-party cookies exist.
  2. 2Create a secret key in Developers and set TRAKERO_SECRET_KEY on the server.
  3. 3Call trakero.purchase(...) where the order is created, passing shopperFromRequest(req).
  4. 4Call refund and cancel from your order lifecycle.

Questions

How do I install it?+

The package is @trakero/node. Until the public npm release, install it from the Trakero repository (sdk/node).

Does it work in the Edge runtime?+

Yes. It only needs fetch and AbortController.

Works together with