Zero Bad Leads
Send Leads6 min readFebruary 25, 2026

Connect Meta Conversions API (CAPI)

How to set up the Meta Conversions API to send qualified lead events and optimize your ad campaigns.

What is the Meta Conversions API?#

The Meta Conversions API (CAPI) allows you to send conversion events directly from the server to Meta (Facebook/Instagram). Unlike the Pixel, which depends on the visitor's browser, CAPI sends data server-side, ensuring greater accuracy.

Why use CAPI?#

  • More data: does not depend on cookies or ad blockers
  • Better attribution: Meta can associate conversions more accurately
  • Campaign optimization: the algorithm receives real quality signals from leads
  • Qualified leads = better conversions: by sending only qualified leads, you train the Meta algorithm to find similar people

By sending qualified lead events via CAPI, your ad campaigns start optimizing for lead quality, not just form submission volume. This can significantly reduce the cost per qualified lead.

Prerequisites#

  • A Meta Business Manager ad account
  • A Facebook Pixel configured
  • A Conversions API access token
  • An active scoring profile in Zero Bad Leads

Obtain the credentials#

Access the Events Manager

Go to the Meta Events Manager and select the Pixel you want to use.

Get the Pixel ID

The Pixel ID appears just below your Pixel's name. It is a 15-16 digit number (e.g., 123456789012345). Copy this value.

Generate the Access Token

On the Pixel page:

  1. Click the "Settings" tab
  2. Scroll to the "Conversions API" section
  3. Click "Generate access token"
  4. Copy the generated token

The Access Token has permission to send events on your Pixel. Store it securely and never share it publicly.

Configure in Zero Bad Leads#

Access Outbound Integrations

In the sidebar, click Send Leads. Find the Meta CAPI card and click "Integrate".

Enter credentials

Paste the credentials you obtained:

  • Pixel ID: your Pixel ID (e.g., 123456789012345)
  • Access Token: the token generated in Events Manager

Configure the event type

Choose the event type to be sent to Meta:

EventWhen to use
LeadQualified lead (most common)
CompleteRegistrationWhen the lead completes a registration
ContactWhen the lead initiates contact
SubmitApplicationWhen the lead submits an application

The Lead event is the most recommended for most cases. It allows Meta to optimize your campaigns to find more people with a profile similar to your qualified leads.

Name the integration

  • Integration name: give it a descriptive name (e.g., "Meta CAPI - Qualified Leads")

Activate and test

Activate the integration and click "Send test lead". Check in Events Manager if the event appeared.

Data sent automatically#

Zero Bad Leads sends the following data to Meta, all hashed with SHA-256 to protect privacy:

DataCAPI ParameterHash
EmailemSHA-256
PhonephSHA-256
First namefnSHA-256
Last namelnSHA-256
CountrycountrySHA-256
Lead IDexternal_idSHA-256
Lead IPclient_ip_addressNo (required for match)
User Agentclient_user_agentNo (required for match)
Event IDevent_idNo (deduplication with Pixel)
Consentdata_processing_optionsNo (compliance)

Personal data (email, phone, name) is sent with SHA-256 hash as required by Meta. Zero Bad Leads never sends plain-text data to the Conversions API.

Requirement: For events to be sent to Meta, the Tracking Script (zbp.js) must be installed on the client's website. Without the script, dispatch jobs for Meta will be marked as "Skipped" to avoid sending low-quality events that hurt optimization. See how to install at Tracking Script (zbp.js).

Improve Event Match Quality with the Tracking Script#

To maximize the quality of events sent to Meta, install the Tracking Script (zbp.js) on your client's website. With it, Zero Bad Leads captures additional browser data:

Additional dataCAPI ParameterEMQ Impact
Meta Browser IDfbpHigh — enables deduplication with the Pixel
Meta Click IDfbcHigh — ad click attribution
Conversion pageevent_source_urlMedium — conversion context

When this data is present, Zero Bad Leads also changes the action_source from system_generated to website, which gives maximum weight in Meta's bidding model.

Without the script, typical EMQ is 3-5/10. With the script installed, EMQ rises to 7-9/10, significantly improving your campaign optimization. See how to install at Tracking Script (zbp.js).

Verify in Events Manager#

After configuring, go to Events Manager to verify:

  1. Open the Events Manager
  2. Select the configured Pixel
  3. Click the "Test Events" tab
  4. Check if the event appears in the list
  5. Review the match quality (Event Match Quality)

A match quality above 6.0 is considered good. The more data sent (email + phone + name), the better the match.

Troubleshooting#

Event does not appear in Events Manager:

  • Check that the Pixel ID and Access Token are correct
  • Events can take up to 20 minutes to appear in Events Manager
  • Use the "Test Events" tab to verify events in real time

Low Event Match Quality:

  • Make sure leads have email and phone. The more data, the better the match
  • Install the Tracking Script (zbp.js) on the client's website to capture _fbp, _fbc, and other browser data
  • Check that IP and User Agent are being collected in the inbound webhook

"Invalid OAuth access token" error:

  • The token may have expired. Generate a new one in Events Manager
  • Check that the token was not copied with extra spaces

Duplicate event:

  • Zero Bad Leads sends a unique event_id per lead to prevent deduplication
  • If you also use the Pixel on the frontend, Meta automatically deduplicates by event_id

For best results, use CAPI together with the Pixel on the frontend. Meta automatically combines both signals (deduplication by event_id) and increases attribution accuracy.