Next.js
Meta sees the sale once in Next.js — not twice, not never
One setup: the Pixel in the browser, the purchase from the server. Developers: the App Router install is in /docs.
App Router makes Pixel setup easy to get wrong: a script in the layout with no checkout ID, then a separate fetch to Meta from a route with a different id. You double-count desktop and lose iOS.
Use one client so Meta sees the sale once.
For developers
The exact App Router install, including environment variables, lives in /docs. Below is the shape of the purchase call — not a second Conversions API client.
bashnpm install @caply/tracktsawait caply.trackPurchase({
eventId: crypto.randomUUID(),
email,
value: amount,
currency: "USD",
});Pass that checkout ID into the thank-you page Pixel fire if the browser still runs. Caply hashes email once. Match Forecast on the ingest response tells you if Meta is likely to recognize the sale before Events Manager updates.
Keep the API key off the public bundle for checkout: fire money events from a server route. Next.js is not no-code.
Caply
Match Forecast on every purchase. Tracking radar on competitor storefronts. Managed server-side tracking without a tagging server.
Start 14-day trial