Facebook CAPI Custom Conversions for Affiliate Offers: Setup Without a Website
Facebook CAPI custom conversions let affiliates report conversion events to Meta even when they have no pixel installed on the advertiser domain. Instead of relying on browser-side tracking, you send server events through your tracker's postback chain directly into the advertiser's dataset via the Conversions API.
Why Affiliates Need Server-Side Custom Conversions
In a typical affiliate flow the conversion happens on the advertiser's landing page or checkout. You have no ability to install a Meta pixel there. Without a conversion signal reaching the ad account, campaign optimization stalls.
The Conversions API solves this by accepting server events from any authorized system. Your tracker already receives a postback from the CPA network when a conversion fires. That postback contains the data you need to construct a valid CAPI event.
Technology providers can transmit events on behalf of clients using Facebook Login for Business, Meta Business Extension, a shared dataset, or a Client system user access token.
For affiliates, the most common path is a shared dataset: the advertiser generates an access token scoped to their dataset and hands it to you or configures it inside a shared tracker. If you need help obtaining the dataset ID and token, see Facebook Pixel ID and Access Token.
How the Postback-to-CAPI Chain Works
Here is the data flow in sequence:
- A user clicks your ad and lands on the advertiser's page. Your tracker records the click ID (fbclid or your internal sub ID).
- The user converts. The CPA network fires a postback to your tracker URL with conversion parameters (payout, goal name, sub IDs).
- Your tracker matches the postback to the original click and triggers an outgoing request to a CAPI relay endpoint.
- The relay formats the payload and POSTs it to the Meta Graph API /events edge for the target dataset.
CPA Network --> Tracker (postback in)
|
v
CAPI Relay (format + auth)
|
v
Meta /events endpoint (dataset)The relay can be a lightweight serverless function, a module inside your tracker (Keitaro, Binom, or similar), or a dedicated platform like MOST that automates conversion routing. For the generic Keitaro flow, refer to Facebook CAPI in Keitaro.
Mapping Postback Fields to CAPI Event Parameters
The Conversions API requires specific fields for each server event. Below is a mapping table for a typical affiliate postback:
| Postback field | CAPI parameter | Notes |
|---|---|---|
| goal_name or offer_id | event_name | Use a custom name like AffiliatePurchase or LeadApproved |
| conversion_time | event_time | Unix timestamp; must be within 7 days |
| click_id / sub_id | user_data.fbp or user_data.external_id | Hash with SHA-256 before sending |
| payout | custom_data.value | Numeric; pair with currency |
| currency | custom_data.currency | ISO 4217 code |
| landing_url | event_source_url | The page where conversion happened |
| (fixed) | action_source | Use website for landing-page conversions |
The event_name field is where custom conversions come in. You define a custom conversion in Meta Events Manager by creating a rule that matches your chosen event name. When the CAPI event arrives with that name, Meta attributes it to the custom conversion.
{
"data": [
{
"event_name": "AffiliatePurchase",
"event_time": 1753600000,
"action_source": "website",
"event_source_url": "advertiser-landing.example/thank-you",
"user_data": {
"fbp": "<hashed_fbp>",
"external_id": "<hashed_sub_id>"
},
"custom_data": {
"value": 42.50,
"currency": "USD"
}
}
]
}The endpoint accepts batches of up to 1,000 events per request. See the official reference for full parameter details: Conversions API Server Event Parameters.
Creating the Custom Conversion in Events Manager
Steps in Meta Events Manager:
- Open Events Manager and select the dataset that receives your CAPI events.
- Navigate to Custom Conversions and click Create Custom Conversion.
- Set the data source to your dataset.
- Under Rules, choose Event equals and type the exact custom event name (for example,
AffiliatePurchase). - Optionally add a value rule (value > 0) to filter test events.
- Name the conversion and save.
After creation, the custom conversion appears in the ad set optimization dropdown within a few hours. If events do not show up, check delivery with the Meta Test Events Tool.
A rule-based conversion type in Meta that fires when an incoming event matches conditions you define, such as a specific event_name or URL parameter. Unlike standard events (Purchase, Lead), custom conversions require no code changes once the rule is set.
Configuring Access: Dataset, Token, and Partner Agent
You need three things before the first POST:
- Dataset ID - the numeric identifier of the advertiser's pixel/dataset (same ID used for browser pixel events).
- Access token - a long-lived system-user token with
ads_managementandbusiness_managementpermissions scoped to the dataset. - partner_agent - a string identifying your platform (for example,
keitaro-2.1ormost-relay-1.0). Meta uses this for partner attribution.
The advertiser generates the token in Business Settings > System Users, assigns the dataset asset, and shares credentials securely. Never hard-code tokens in client-side code or public repos.
For the 7-day event_time limitation and how to handle delayed postbacks, read Facebook CAPI Error 2804003: Bypassing the 7-Day Limit.
Validating Delivery and Troubleshooting
Validation checklist:
- Open Events Manager > Test Events and add your dataset.
- Fire a test conversion from the CPA network (most networks support a test postback).
- Confirm the event appears in the Test Events feed within 60 seconds.
- Verify event_name matches your custom conversion rule exactly (case-sensitive).
- Check that user_data contains at least one matching key (fbp, em, or external_id).
- Review the Events Quality tab for match-rate warnings.
Common issues:
- Event not appearing - token lacks dataset permission, or event_time is older than 7 days.
- Custom conversion not firing - event_name mismatch (extra spaces, wrong case).
- Low match rate - user_data fields not hashed with SHA-256, or fbp cookie missing.
If you run manual pixel tests alongside CAPI, activate the pixel properly first. For free manual activation, use Pixel Activator.
Attribution Windows and Optimization Impact
Meta applies attribution windows (1-day click, 7-day click, 1-day view by default) at the ad account level. Your CAPI event must carry a click identifier (fbp or external_id) that Meta can match to an impression within the active window.
If your CPA network delays postbacks by more than 24 hours, conversions may fall outside the 1-day click window. Configure your tracker to relay postbacks immediately and store the original fbclid at click time.
For a deeper look at multi-platform tracker postbacks, see Keitaro Postback Setup for Facebook and TikTok.
