Adset.ProAdset.ProKnowledge base
To app
Home/Pixels/Facebook Pixel (Conversions API)

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

  1. Go to Facebook Events Manager (https://business.facebook.com/events_manager)

  2. Select your pixel

  3. Go to Settings → Pixel ID

  4. Copy the ID (for example: 1234567890123456)

Step 2: Get the Conversions API Access Token

  1. In Events Manager, open your pixel

  2. Go to Settings → Conversions API → Generate Access Token

  3. 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

Purchase

For deposits (accept)

CompleteRegistration

Completed registration

For registrations (hold)

Lead

Lead

For leads, PWA installs (pwa_install)

ViewContent

Content view

For landing views

AddToCart

Add to cart

—

InitiateCheckout

Checkout started

—

AddPaymentInfo

Payment info added

—

Contact

Contact

—

SubmitApplication

Application submitted

—

Subscribe

Subscription

—

Recommended mapping (applied by default):

Tracker event

Facebook event

Comment

pwa_install

Lead

PWA Install = Lead

hold

CompleteRegistration

Registration = Complete Registration

accept

Purchase

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 Purchase event, the actual deposit amount is sent

    • For all other events, 0 is sent with the USD currency

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

  1. 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

  2. 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)

  3. Event deduplication

    • Each event has a unique event_id

    • This prevents duplicate events when they are re-sent