Meta Conversions API

Meta CAPI with maximum Event Match Quality

Self-generated _fbp, captured _fbc from fbclid, SHA-256 hashed PII, and direct Graph API delivery. Higher Event Match Quality means better ad optimisation, lower CPA, and higher ROAS.

Why Event Match Quality matters

Higher EMQ

Better ad optimisation

More identity signals per event means Meta can match conversions to ad impressions more accurately.

Lower CPA

More efficient spend

Better attribution data lets Meta's algorithm optimise delivery to users most likely to convert.

Higher ROAS

Better return on ad investment

Accurate conversion data feeds the optimisation loop, improving return on every pound spent.

Event Match Quality (EMQ) is Meta's score for how well your server events can be matched back to Meta users. It ranges from 0 to 10, and directly impacts how effectively Meta can optimise your ad delivery. Every additional identity parameter you send — fbp, fbc, em, ph — increases your match rate and improves ad performance.

Most server-side implementations struggle to reach EMQ 6 because they lack browser identifiers. Datafly Signal self-generates _fbp and captures _fbc from the fbclid URL parameter, closing the identity gap that other server-side solutions leave open.

Every identity signal, every event

Datafly Signal sends the complete set of identity parameters to Meta Conversions API on every event. Here is exactly what gets sent.

fbp
Source: Self-generated
Format: fb.1.{timestamp_ms}.{random_10_digit}
Description: Browser identifier. Generated server-side in the exact format Meta expects. Set as 400-day server cookie.
fbc
Source: fbclid URL param
Format: fb.1.{timestamp_ms}.{fbclid}
Description: Click identifier. Automatically captured from the fbclid query parameter when a user arrives from a Meta ad.
external_id
Source: Hashed user_id
Format: SHA-256
Description: Your internal user identifier, SHA-256 hashed. Enables Advanced Matching for logged-in users.
em
Source: traits.email
Format: SHA-256
Description: Email address, normalised (lowercase, trimmed) and SHA-256 hashed before transmission.
ph
Source: traits.phone
Format: SHA-256
Description: Phone number, normalised to E.164 format and SHA-256 hashed before transmission.
fn
Source: traits.first_name
Format: SHA-256
Description: First name, normalised (lowercase, trimmed) and SHA-256 hashed.
ln
Source: traits.last_name
Format: SHA-256
Description: Last name, normalised (lowercase, trimmed) and SHA-256 hashed.
ct / st / zp
Source: traits.city / state / zip
Format: SHA-256
Description: Location data, normalised and SHA-256 hashed. Improves match rates for geo-targeted campaigns.
client_ip_address
Source: context.ip
Format: Plain text
Description: Client IP address forwarded from the original request. Required by Meta for event deduplication.
client_user_agent
Source: context.userAgent
Format: Plain text
Description: Browser user agent string from the original request. Used by Meta for device-level matching.
fb_login_id
Source: Facebook Login
Format: Plain text
Description: If your site uses Facebook Login, the user's Facebook ID is forwarded for direct identity matching.

All PII is automatically SHA-256 hashed as required by Meta. Email, phone, names, and location data are normalised (lowercase, trimmed, formatted) and hashed before leaving your server. Raw PII never reaches the Meta API.

Pipeline as Code

Purpose-built Meta CAPI transformation

This pipeline config transforms an Order Completed track event into a Meta Conversions API purchase event. User data is automatically hashed, vendor IDs are enriched from cookies, and product data is mapped to Meta's content format.

  • user_data block with em, ph, fbp, fbc, external_id, IP, and user agent
  • custom_data block with content_ids extracted from product array
  • Automatic SHA-256 normalisation for all PII fields
  • Vendor ID enrichment from server-set _fbp and _fbc cookies
  • Output validation against Meta's API schema before delivery
meta-capi-purchase.yamlYAML
# meta-capi-purchase.yaml — Purchase event to Meta Conversions API
name: meta_capi_purchase
integration: meta-conversions-api
trigger:
  event: track
  conditions:
    - field: event
      operator: equals
      value: Order Completed

transform:
  # Event metadata
  static:
    - target: event_name
      value: Purchase
    - target: action_source
      value: website

  mapping:
    - source: timestamp
      target: event_time
      transform: unix_epoch

  # User data — auto-hashed PII
  user_data:
    - source: traits.email
      target: em
      transform: sha256_normalise
    - source: traits.phone
      target: ph
      transform: sha256_normalise
    - source: traits.first_name
      target: fn
      transform: sha256_normalise
    - source: traits.last_name
      target: ln
      transform: sha256_normalise
    - source: context.ip
      target: client_ip_address
    - source: context.userAgent
      target: client_user_agent

  enrichments:
    - type: vendor_id
      vendor: meta
      cookies: [_fbp, _fbc]
    - type: identity
      source: user_id
      target: external_id
      transform: sha256

  # Custom data — purchase details
  custom_data:
    - source: properties.products
      target: content_ids
      transform: pluck
      field: product_id
    - source: properties.products
      target: content_type
      value: product
    - source: properties.revenue
      target: value
    - source: properties.currency
      target: currency
      default: USD

output:
  format: meta_conversions_api
  endpoint: https://graph.facebook.com/v18.0/{pixel_id}/events
  auth: access_token
  validate: true

No Meta Pixel required

Datafly Signal delivers events directly to the Meta Conversions API via the Graph API. There is no Meta JavaScript in the browser at all.

Self-generated _fbp

Generated server-side in the exact Meta format (fb.1.{timestamp_ms}.{random_10_digit}) and set as a server-set cookie with 400-day expiry. Fully ITP-exempt.

Captured _fbc from fbclid

When a user arrives from a Meta ad, the fbclid query parameter is automatically captured and formatted as _fbc (fb.1.{timestamp_ms}.{fbclid}). Set as a 90-day server cookie.

ITP-exempt server cookies

Both _fbp (400-day) and _fbc (90-day) are set via Set-Cookie headers from your first-party subdomain. Safari ITP does not restrict server-set cookies on genuine first-party domains.

Direct Graph API v18.0 delivery

Events are delivered directly to graph.facebook.com/v18.0/{pixel_id}/events with your access token. Purpose-built delivery worker with exponential backoff retry.

Zero Meta JavaScript

No fbevents.js, no Meta Pixel, no Facebook SDK. The only JavaScript in the browser is your 4.2KB Datafly.js collector.

Event deduplication

Each event includes an event_id for server-to-server deduplication. If you run a hybrid setup during migration, Meta will automatically deduplicate overlapping events.

Improve your Event Match Quality

See how Datafly Signal sends the complete set of identity parameters on every Meta CAPI event. Higher EMQ, better optimisation, lower CPA.