Facebook Pixel (Conversions API)
What is Facebook Conversions API?
Facebook Conversions API (CAPI) is a server-to-server integration that lets you send conversion events directly from your server to Facebook. This improves data quality and ad campaign optimization.
Benefits of CAPI:
-
✅ Bypasses ad blockers and iOS 14+ restrictions
-
✅ More accurate conversion attribution
-
✅ Better performance of Facebook optimization algorithms
-
✅ Ability to send conversion value data (revenue)
Getting the data for setup
Step 1: Get the Pixel ID
-
Go to Facebook Events Manager (https://business.facebook.com/events_manager)
-
Select your pixel
-
Go to Settings → Pixel ID
-
Copy the ID (for example:
1234567890123456)
Step 2: Get the Conversions API Access Token
-
In Events Manager, open your pixel
-
Go to Settings → Conversions API → Generate Access Token
-
Copy the token (for example:
EAABsbCS1234...)
IMPORTANT: Keep the token secret! Do not share it with third parties.
Setting up a Facebook pixel in the tracker
"Pixel ID" field
Paste the copied Pixel ID (digits only, no spaces).
Example:
1234567890123456
"Pixel Access Token" field
Paste the full Access Token.
Example:
EAABsbCS1234ZABCDEFGabcdefg1234567890HIJKLMNOP
Event mapping for Facebook
Facebook supports the following standard events:
Facebook event | Description | When to use |
|---|---|---|
| Purchase | For deposits ( |
| Completed registration | For registrations ( |
| Lead | For leads, PWA installs ( |
| Content view | For landing views |
| Add to cart | — |
| Checkout started | — |
| Payment info added | — |
| Contact | — |
| Application submitted | — |
| Subscription | — |
Recommended mapping (applied by default):
Tracker event | Facebook event | Comment |
|---|---|---|
|
| PWA Install = Lead |
|
| Registration = Complete Registration |
|
| Deposit = Purchase |

Additional data sent to Facebook
The tracker automatically sends the following data along with events:
User Data:
-
client_ip_address — the user's IP address (from the event's
event.user_ip) -
client_user_agent — the browser User Agent (from the event's
event.user_ua) -
fbc — Facebook Click ID (from
event.ext_click_id+ click time)
Custom Data (conversion data):
-
currency — conversion currency (from
conversion.currency) -
value — conversion amount (from
conversion.revenue)-
For the
Purchaseevent, the actual deposit amount is sent -
For all other events,
0is sent with theUSDcurrency
-
Event Metadata:
-
action_source — always
website -
event_source_url — landing URL (for example:
https://domain.com/track/campaign_id/ads) -
event_id — unique postback ID (for deduplication)
-
event_time — conversion time as a Unix timestamp (in seconds)
How Facebook CAPI works in the tracker
-
Data hashing
-
The tracker does NOT hash the IP and User Agent — they are sent as is
-
Facebook hashes the data on its own side
-
-
FBC (Facebook Click ID)
-
Format:
fb.1.<timestamp_ms>.<fbclid> -
Example:
fb.1.1705319400000.AbCdEfGh123 -
The time is taken from the original click (not from the conversion)
-
-
Event deduplication
-
Each event has a unique
event_id -
This prevents duplicate events when they are re-sent
-
