Next.js and Node.js

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.

Start freeIntegration: availableIntegrations
  • Next.js / Node
  • Browser SDK
Trakero
  • Meta CAPI
  • TikTok
  • GA4

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.

Today's deliveries

Purchase #1043

Chrome, ad blocker on · Meta CAPI · 0.4 s

The ad blocker stops the browser Pixel on its way to facebook.com. The same purchase leaves your server, reaches Meta through the Conversions API and is counted.

Sample deliveries. Pick a row to watch its route.

Shopper, Sent to, Took

Set up in minutes

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

Your store → your domain → Meta, Google, TikTok

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.

Start counting every order today

Create a free account, connect your store and watch a test order arrive in Meta Events Manager.

Free plan · No card needed · Set up in one afternoon