Overview
Facebook Conversions API (CAPI) enables Affnook to send conversion events directly from the server to Facebook's advertising platform. Unlike browser-based tracking, CAPI is not affected by ad blockers, browser privacy restrictions, cookie limitations, or iOS privacy updates.
By sending conversion data directly to Facebook, advertisers can accurately attribute conversions, optimize campaign performance, and improve audience targeting and retargeting.
Benefits of Facebook CAPI
Using Facebook Conversions API provides several advantages:
Improved conversion attribution accuracy
Reduced dependency on browser tracking
Better performance despite ad blockers and privacy restrictions
Enhanced campaign optimization using server-side conversion signals
Reliable tracking across devices and browsers
Support for Facebook's advanced bidding and retargeting features
How the Integration Works
The following flow describes how conversion data is sent from Affnook to Facebook:
A user clicks on a Facebook advertisement.
The click is tracked and the Facebook Click ID (fbclid) is captured.
The user completes a tracked action such as:
Registration
First Time Deposit (FTD)
Deposit
Conversion Event
A conversion event is generated within Affnook.
The system checks the configured Facebook CAPI postback rules.
Required macros and values are resolved.
A server-to-server request is sent to Facebook through the Conversions API.
Facebook receives and processes the conversion event.
The delivery status is recorded in the postback logs.
Facebook Integration Setup
Before configuring postbacks, Facebook credentials must be added to Affnook.
Required Fields
Field | Description |
Dataset ID | Facebook Pixel ID or Dataset ID |
Access Token | Facebook Marketing API Access Token |
Name | Internal identifier for the integration |
Example
Field | Example |
Dataset ID | 123456789012345 |
Access Token | EAAxxxxxxxxxxxxxxxx |
Name | Main Facebook Pixel |
Multiple Facebook integrations can be configured within a single organization to support different brands, regions, or campaigns.
How to Configure Facebook CAPI
Step 1: Navigate to Facebook CAPI
Log in to your Affnook panel.
From the Dashboard, navigate to Automation.
Click on Facebook CAPI.
This section allows you to configure your Facebook integration and manage Facebook conversion postbacks.
Configuring Facebook CAPI
Click Add Configuration to create a new Facebook CAPI configuration.
Fill in the following details:
Field | Description |
Business Name* | Enter a name to easily identify this Facebook integration. |
Facebook Dataset ID* | Enter your Facebook Dataset (Pixel) ID where conversion events will be sent. |
Access Token* | Enter the Facebook Conversions API Access Token generated from Facebook Events Manager. |
Status | Enable or disable the configuration without deleting it. |
After entering all the required details, click Save.
Adding a Facebook Postback
Once the Facebook configuration has been created, navigate to the Facebook Postback section.
Click Add Postback to create a new Facebook conversion mapping.
Configure the Postback
Fill in the following details:
Field | Description |
Affiliate* | Select the affiliate whose conversions should be sent to Facebook. |
Campaign* | Select the campaign for which Facebook postbacks should be enabled. |
Facebook Config* | Select the Facebook configuration created in the previous step. |
Event* | Select the Affnook event that will trigger the Facebook conversion event. |
Action Source* | Specify where the conversion occurred, such as Website or App. |
Postback Config Name | Enter a descriptive name to easily identify this postback configuration. |
Facebook Event ID | Specify a unique Event ID or macro to help Facebook deduplicate conversion events. |
Most Used URL Tokens
Affnook provides several macros that can automatically populate values while sending conversion events to Facebook.
Some commonly used macros include:
Macro | Description |
{tracking_token} | Sends the unique tracking token generated for the click. |
{p1} | Sends the value stored in the P1 parameter. |
{click_ip} | Sends the IP address of the user who clicked the tracking link. |
{customer_id} | Sends the unique customer identifier. |
{customer_name} | Sends the customer's name, if available. |
{campaign_id} | Sends the unique Campaign ID associated with the conversion. |
Facebook Custom Data
This section allows you to send additional conversion information to Facebook.
Value Macro
Select the macro that should be used to send the conversion value (for example, payout, sale amount, or revenue).
Currency Macro
Select the macro that should send the currency associated with the conversion (for example, USD, INR, or EUR).
Providing value and currency helps Facebook optimize campaigns for higher-value conversions.
Facebook User Data
The Facebook User Data section allows you to map customer information that Facebook uses to improve event matching and attribution.
Supported user data may include information such as email address, phone number, IP address, customer ID, and other supported identifiers. Providing accurate user data improves Facebook's ability to match conversion events with users while maintaining privacy standards.
Save the Configuration
After completing all required fields, click Save to activate the Facebook Postback configuration.
Once enabled, Affnook will automatically send the configured conversion events to Facebook whenever the selected campaign and event conditions are met.
Best Practices
Verify that your Facebook Dataset ID and Access Token are valid before saving the configuration.
Use unique Facebook Event IDs to prevent duplicate conversion reporting.
Configure the appropriate Action Source based on where the conversion occurs.
Use Value and Currency macros whenever possible to enable value-based optimization in Facebook Ads.
Test the configuration after setup to ensure events are being received successfully in Facebook Events Manager.
We are delighted to have assembled a world-class team of experienced professionals who are ready to take care of your queries and answer any questions you may have. Feel free to reach out to us at anytime by emailing us at [email protected] or by using the in-platform chat feature. We'd love to hear from you!





