Documentation Index

Fetch the complete documentation index at: https://help.branch.io/llms.txt

Use this file to discover all available pages before exploring further.

Meta Ads Web Conversions API (New)

Prev Next

Overview

Meta Web CAPI enables Branch to forward web conversion events to Meta's Conversions API server-side. When users click your Meta ads via Branch Ad Links, Branch captures click metadata, attributes the resulting web conversions, and forwards those events back to Meta, closing the full signal loop between ad click, attribution, and campaign optimization.

Branch has always attributed web conversions. With Meta Web CAPI enabled, Branch now also shares that web conversion signal with Meta, giving Meta's algorithm the data it needs to improve Event Match Quality (EMQ), optimize ad delivery, and surface more complete conversion reporting in Meta Events Manager without relying solely on browser-based pixel tracking.

For more information about integrating ad partners in general, visit our Ad Partner Integration Guide.

Note: Meta Web CAPI vs. Meta SAN attribution

Meta Web CAPI sends web conversion signal from Branch to Meta to support optimization and reporting. It is separate from the Meta SAN integration, which returns app attribution claim data to Branch. Enabling Meta Web CAPI does not change how Branch attributes conversions or how Meta SAN credit is assigned in Branch.

Partner capabilities

Capability

Details

Supported event sources

Branch Web SDK, Server-to-server (S2S)

Platforms

Web

Event Match Quality (EMQ)

Supported; enhanced when fbc is present

Event deduplication

Supported via event_id (mapped from event_data.transaction_id)

Before you begin

To set up Meta Web CAPI, you need:

  • Branch's Performance Product enabled for your Branch account. Contact your Branch account manager or visit https://branch.io/pricing.

  • The Meta (Facebook) integration enabled in Branch under Configuration > Integrations > Ad Partners.

  • The Branch Web SDK implemented on your website with event tracking configured, or web conversion events sent via server-to-server (S2S) ingestion.

  • Branch Ad Links placed in your Meta web campaigns.

    • This is a primary matching signal Branch uses when forwarding events to Meta CAPI and has positive impact on EMQ. See more about EMQ.

Enable Meta Web CAPI

To begin, navigate to Configuration > Ad Partners > Facebook in Branch.

Meta CAPI requires a Dataset ID and CAPI Access Token from your Meta Events Manager account. Follow the steps below to retrieve these credentials and enable CAPI forwarding in Branch.

Step 1: Retrieve your Dataset ID

  1. Log in to Meta Events Manager.

  2. Navigate to Datasets and select your Dataset (Pixel) from the left panel.

  3. Your Dataset ID can be retrieved from the Events Activities window. Copy this value.

Step 2: Generate a CAPI Access Token

  1. In Meta Events Manager, select the dataset from Step 1.

  2. Select the Settings tab.

  3. Under Conversions API, locate the Access Token section and select Generate access token. Copy this token.

Step 3: Enter credentials in Branch

  1. In Branch, navigate to Ad Partners > Facebook and open the Partner Settings dialog.

  2. Under Postback credentials, enter the Dataset ID and CAPI Access Token from Steps 1 and 2.

  3. Select Save.

Once saved, Branch will begin forwarding eligible web conversion events to Meta CAPI based on your configuration.

Configure postbacks

Web conversion events are forwarded to Meta CAPI based on your postback configuration. Branch maps these to Meta's standard Conversions API event names as follows:

Meta event

Branch event

Purchase

PURCHASE

AddToCart

ADD_TO_CART

ViewContent

VIEW_ITEM

InitiateCheckout

INITIATE_PURCHASE

CompleteRegistration

COMPLETE_REGISTRATION

Search

SEARCH

AddToWishlist

ADD_TO_WISHLIST

Subscribe

SUBSCRIBE

StartTrial

START_TRIAL

{custom_event_name}

{custom_event_name}

Enable Send all events on the Postback config tab to forward all web conversion events Branch receives, not just events attributed to Meta campaigns. This gives Meta the broadest possible signal for optimization and reporting.

To add postbacks for additional events or to customize behavior, follow the steps in the "Configure postbacks" section in the general Ad Partner Integration Guide.

Deduplication with Meta Pixel

If you also use the Meta Pixel or leverage CAPI through other sources, the same conversion event may be sent multiple times. Meta deduplicates these using a shared event_id . If both events carry the same event_name and event_idMeta counts them as a single conversion.

Branch uses transaction_id as the event_id sent to Meta CAPI. To facilitate deduplication, pass the same transaction_id in your Branch Web SDK event as you do for the eventID in your Meta Pixel event for the same conversion.

Caution: transaction_id required for deduplication

If transaction_id is not provided on the event, Branch will omit event_id from the CAPI payload. Meta will not be able to deduplicate those events with Pixel, which may result in duplicate conversions in Meta reporting.

Verify your data

After saving your credentials and configuring postbacks, verify that events are flowing correctly:

  • In Branch Liveview: confirm that web conversion events from your site appear in real time. Filter for Platform = Web to isolate web events.

  • In Meta Events Manager: navigate to your dataset and confirm that events forwarded by Branch appear under the Overview tab.

  • In Meta Events Manager > Test Events: use the Test Events tool to send a test conversion and verify it’s received and matched correctly.

CAPI data mappings

Branch maps the following fields from web conversion events to the Meta Conversions API payload:

Meta CAPI field

Branch source field

Notes

event_name

name

Mapped to Meta standard event names. See event mapping table above.

event_time

event_timestamp

Unix timestamp in seconds.

event_id

event_data.transaction_id

Used for event deduplication. Omitted if transaction_id is not present on the event.

action_source

Hardcoded: "website"

Required by Meta for all web CAPI events.

event_source_url

user_data_http_origin

The URL of the page where the conversion occurred.

user_data.client_ip_address

user_data_ip

Captured from the originating web request.

user_data.client_user_agent

user_data_user_agent

Captured from the originating web request.

user_data.fbc

&fbclid (via Branch ad link)

Formatted as fb.1.{create_timestamp}.{fbclid}. Omitted if fbclid is not present.

custom_data.value

revenue

Included when present on the event.

custom_data.currency

currency

Included when present on the event.

custom_data.contents

content_items[]

Maps $sku, $quantity, and $price from each content item.

custom_data.content_ids

content_items[].$sku

Array of $sku extracted from content items.

Map content type to product

Note that Branch will automatically map “content_type”: “product” when the event carries content_items[]. Otherwise, Branch will not add the “content_type” variable.

Troubleshoot

Follow the steps below to troubleshoot common issues with Meta Web CAPI.

Events not appearing in Meta Events Manager

If forwarded events are not appearing in Meta Events Manager:

  1. Confirm that your Dataset ID and CAPI Access Token are entered correctly in Branch. An invalid token causes all events to be rejected by Meta.

  2. Confirm that web events are being tracked through the Branch Web SDK or S2S and are appearing in Branch Liveview. Branch can only forward events it has received.

  3. Confirm that Send all events is enabled on the Postback config tab, or that the specific events you expect are included in your active postbacks.

Low EMQ score

  1. Confirm that Branch Ad Links are placed in your Meta campaigns. Without Branch Ad Links, Branch cannot capture the fbc parameter, which will be absent from CAPI events. fbc is the primary click-level matching signal and has positive impact on EMQ.

  2. Confirm that your Branch Web SDK implementation is capturing the page URL where conversions occur (event_source_url). Along with IP address and user agent, this field contributes to match quality when fbc is absent.

Duplicate conversions in Meta reporting

If you are using both Meta Pixel and Branch CAPI and see higher-than-expected conversion counts in Meta reporting, deduplication may not be working. Confirm that:

  1. The transaction_id passed in your Branch Web SDK event matches the eventID passed in your Meta Pixel event for the same conversion.

  2. Both the Pixel event and the CAPI event use the same event_name. Meta requires both the event name and the event ID to match for deduplication.