Meta Conversions API Setup for Leads

Daniel Kalcher

CTO, lead-metrics.com

10 min read

You can do a Meta Conversions API setup by sending events such as "Lead" from a server to Meta in addition to the browser, using an access token, the required fields and a shared event_id. Without a developer, that works through a partner integration, the Conversions API Gateway or a tracking tool that sends the events. For lead campaigns, what matters most is what happens after the form: qualified, meeting booked, deal won. As of November 2026.

The short version

  • Four routes according to Meta: partner integration, Gateway, manual and direct. Which one fits depends on whether you want to send website events or CRM events.
  • Required fields per event: event_name, event_time, action_source and user_data. Website events also need event_source_url.
  • Same name, same event_id: only then does Meta count an event that arrives through Pixel and server once. The window for this is 48 hours.
  • At most 7 days old: Meta rejects older events together with the entire request.
  • Test with care: events sent with a test_event_code still end up in Events Manager and in your reporting.

Meta Conversions API setup: choosing the right route

Meta's help centre lists four ways to set up the Conversions API: through a partner, through the Gateway, manually or directly. For leads, a fifth question comes on top: who sends the events that happen after the form? The Pixel cannot know them, because they happen in the CRM.

RouteWho needs itDeveloper needed?Covers CRM events?
Direct through Meta (Events Manager)Sending website events only, without hosting or upkeepNoNo
Partner integrationWebsite builder or shop with a Meta connectionNoDepends on the partner
Conversions API GatewayMore control over website events, own cloud account availableNot according to Meta, the infrastructure is set up automaticallyNo
Manual with code or a server containerCustom events, full controlYes, or tracking know-howYes
Tracking tool as the senderLeads, deals and payments from several sourcesNoYes

With the Gateway you only pay for cloud resources or the partner, according to Meta. It runs on AWS or GCP in your account, so an account with a third-party cloud provider is mandatory (Meta for Developers: Conversions API Gateway).

What you need before you start

Have three things ready before you begin:

  1. Pixel ID: your existing Pixel keeps working. Meta says to use the same ID for browser and server.
  2. Access to the business: you only see the token with developer permissions.
  3. A list of events: decide up front which steps of your lead chain count as an event (see the table below). That saves rework later, because a renamed event is a new event for Meta.

For lead campaigns with Meta Instant Forms, optimising for CRM stages runs through a separate mechanism that this article does not cover. The article on Meta Conversion Leads explains how it works.

Meta Conversions API setup in 6 steps

The steps apply to every route. If you use a tool or a partner integration, it handles steps 3 and 4, but the logic stays the same.

  1. Check the Pixel in Events Manager

    Open your data source (Pixel) in Events Manager and confirm that the lead event arrives from the browser. Without a working Pixel you have nothing to compare against later, so you cannot tell whether browser and server report the same thing.

  2. Choose the route and the sender

    Decide using the table above and write down which system sends which event. Two systems sending the same event create duplicates that are painful to track down later.

  3. Generate the access token

    In the Pixel settings you find the Conversions API section. For the manual setup you generate the access token there. Meta notes that the link is only shown to users with developer permissions. Treat the token like a password and never put it into frontend code.

  4. Send the first event with the required fields

    The call is a POST to https://graph.facebook.com/{API_VERSION}/{PIXEL_ID}/events, with the events in the data field. Required are event_name, event_time (Unix time in seconds), action_source and user_data. See the example below.

  5. Add the event_id

    Give every event its own event_id and set the same ID in the Pixel as eventID. More on that in the deduplication section.

  6. Test, then go live

    Send the event with test_event_code, check it in the Test Events tab, remove the code and send for real.

A lead event with real values looks like this. The email max.mustermann@beispiel.de is trimmed and lowercased before hashing and gives the SHA-256 value below:

{
  "data": [{
    "event_name": "Lead",
    "event_time": 1795947300,
    "event_id": "lead_48213",
    "action_source": "website",
    "event_source_url": "https://beispiel.de/anfrage",
    "user_data": {
      "em": ["ea16fb10888a62111688175919d1a708bb20ed44479f7a88fb14498dbd6cfcbd"],
      "fbc": "fb.1.1795940000000.AbCdEf123",
      "fbp": "fb.1.1795930000000.123456789",
      "client_ip_address": "203.0.113.7",
      "client_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)"
    }
  }],
  "test_event_code": "TEST12345"
}

Meta's documentation requires SHA-256 for em, ph, fn, ln and other fields. The guide to Event Match Quality shows which extra fields improve matching. client_ip_address, client_user_agent, fbc and fbp are not hashed. For a phone number you remove symbols, letters and leading zeros and add the country code, so 07911 123456 becomes 447911123456 (Meta for Developers: Customer Information Parameters).

Which events to send for leads

A shop sends Purchase and is done. With leads, a chain in the CRM often sits between click and revenue, and each stage can be its own event:

MomentMeta eventSenderValueevent_id
Form submittedLead (standard)Pixel and serveroptional, e.g. lead valuesame ID on both routes
Lead qualifiedcustom event, e.g. QualifiedLeadServer from the CRMoptionallead ID plus stage
Meeting bookedSchedule (standard)Servernomeeting ID
Deal wonPurchaseServer from the CRMdeal value and currencydeal ID plus stage

Events after the form have no Pixel counterpart. Deduplication does not apply there, but the event_id still helps if your system retries a send.

As action_source, Meta lists website, email, phone_call, chat, system_generated and other, among others. Pick the value that matches where the conversion happened. If HubSpot is your CRM, you can send HubSpot deals to Meta by turning deal stages into events. There is no value called "crm" (Meta for Developers: Server Event Parameters).

The value per lead is optional but useful: the lead value calculator helps you estimate it, and sending the deal value as Purchase lets you measure true ROAS in lead generation.

The 7-day limit matters most for CRM events. If you send a batch containing one older event, Meta discards the entire request. The Google Ads counterpart is importing offline conversions into Google Ads, where CRM deals flow back to the ad. LinkedIn has its own route, described in the LinkedIn Conversions API setup. The route to CRM mapping in detail is in the guide Conversions API with your CRM.

Deduplication with event_id

If you send the same lead through Pixel and server, Meta should count it once. Meta recommends two matches for this: the Pixel parameter eventID equals the API's event_id, and the Pixel event equals the event_name. You pass the ID to the Pixel as the fourth argument, like fbq('track', 'Lead', {}, {eventID: 'lead_48213'}).

The rules from Meta's documentation:

  • Deduplication only works if both events arrive within 48 hours of the first event with that ID.
  • If the events do not differ substantially, Meta generally keeps the one it received first.
  • Meta never deduplicates within a single source. Two browser events with the same ID stay two events.
  • As a fallback you can send event_name plus fbp or external_id on both routes. This works mainly when the browser event arrives first.

Deduplicating Pixel and Conversions API events in practice goes beyond these rules. Typical mistakes are a freshly generated ID on the server, a different spelling of the name (lead instead of Lead) and two plugins sending the same event (Meta for Developers: Handling Duplicate Events).

Testing your setup with Test Events

When you send an event, add the test_event_code field at the top level of the request, next to data. You create the code in Events Manager under Data Sources, at your Pixel, in the Test Events tab. The server events then show up there.

Watch out for the trap: events with a test code are not discarded. They still feed into Events Manager, targeting and measurement. Remove the code before you go live (Meta for Developers: Using the API).

Check these cases before you go live:

  1. A test lead through the real form: do the Pixel and server events both arrive, and is one marked as deduplicated?
  2. The same thank-you page loaded twice: does a second lead appear?
  3. A deal set to "won" in the CRM: does Purchase arrive with value and currency?
  4. An event with a timestamp from 8 days ago: see how your system reports the error.

The Conversions API changes the technical route, not the legal position. The Pixel sets cookies and accesses the user's device, which needs consent under Article 5(3) of the ePrivacy Directive (in the UK, regulation 6 of PECR).

Passing an email address, phone number and click IDs to Meta is processing of personal data and needs a legal basis under Article 6(1) GDPR (UK GDPR in the UK). For advertising tracking that is in practice usually consent under point (a).

Hashed data is pseudonymised within the meaning of Article 4(5) GDPR, not anonymous. Your consent banner therefore has to cover the server path too, as with any consent for server-side tracking. Check for each tool whether and how it respects the consent status, and do not assume it happens automatically. The assessment for your case belongs with your data protection officer.

Meta Conversions API setup without a developer

If you want to run a Meta Conversions API setup and also need to combine leads from form tools such as Typeform or Heyflow, your CRM and payments, a tool saves you the manual build.

LeadMetrics detects the email and phone number in the form, attributes the lead to the ad and sends events such as lead, purchase and deal won to Meta from the server. Per project, you map which LeadMetrics event arrives as which Meta event.

It sends SHA-256 hashed contact data, fbc and fbp, value, currency and an event_id. For each lead you see a log of the events sent. You can read more about the feature at Conversion API, about connecting ad accounts at Meta Ads and about attribution overall at lead tracking.

The limit: this does not cover optimising Instant Forms for CRM stages. The feedback channel for that is described in Meta Conversion Leads. And your consent setup remains your job.

Your Pixel shows Meta who submits the form, the Conversions API shows Meta who pays later. When you do your Meta Conversions API setup, make sure the same request only counts once.

Ready for better tracking?

Try LeadMetrics free for 10 days and see which campaigns actually drive revenue.
Try free for 10 days

Ready for better tracking?

Discover how LeadMetrics helps you understand the true ROI of your marketing channels.

Try free for 10 days