Keitaro → Facebook CAPI Postback

A deposit needs to reach Facebook from your affiliate network exactly once — never lost, never doubled. Here's how to wire up an S2S postback from Keitaro into CAPI: which click ID to pass, how to map statuses, and what to check before scaling real spend on it.

The conversion's path from click to CAPI

A user clicks the ad, Facebook attaches its own identifiers to that click (fbclid, fbp/fbc), and Keitaro stores them alongside the click's subid. When the affiliate network later fires a deposit postback at Keitaro's URL, Keitaro pulls those stored identifiers back out and builds the CAPI event — that's how Facebook knows exactly which click led to the conversion, even when it happens well after the click.

Setting up the outgoing postback in Keitaro

Add Facebook CAPI under Keitaro's integrations: the Pixel ID and an access token — a system-user token from Business Manager, under Events Manager → Conversions API settings. Then map conversion statuses to Facebook events: an approved gambling deposit typically maps to Purchase, a lead or signup to Lead or CompleteRegistration, passing along value and currency where you have them.

Click ID and pixel matching

For a CAPI event to score a strong match, it needs to carry the same identifiers the browser pixel saw on that same click — which is why correctly persisting fbclid/fbp through the PWA and Keitaro matters. Facebook will still accept the event without them, but attribution and optimization quality drop noticeably.

Deduplication: one deposit, one counted event

If a browser pixel is already live on the witrina, the same deposit can reach Facebook twice — once client-side, once via CAPI. The fix is a shared event_id, identical on both calls for the same real-world event: Facebook keeps one record and marks the other as deduplicated. Before scaling spend, run a handful of test conversions and confirm in Events Manager that nothing's doubling up.

FAQ

Do I need a pixel on the witrina if CAPI is already set up?
Yes, usually pixel plus CAPI together outperform either alone, and any overlap between them gets resolved by event_id deduplication.
Where do I get the access token for Facebook CAPI?
In Business Manager, under the relevant pixel's Events Manager, in the Conversions API settings — that's where you generate the system-user token for the Keitaro integration.
How do I confirm the postback actually reached Facebook?
Check the events tab in Events Manager: it shows the source (Browser or Server), the receipt status, and whether the timing lines up with the real deposit.
Build your PWA in APEX in minutes

Cloaking, anti-bot, push, split tests and your own domains — in one service.

Get started free

Read also