> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wegive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Facebook Pixel & CAPI

> Browser Pixel context, server Purchase keys, donor matching hashes, and event-ID correlation.

WeGive's **Facebook Pixel** integration loads the browser Pixel. **Meta Conversions API (CAPI)** sends server-side Purchase events. Configure each integration separately in WeGive's Integrations area.

## Browser Pixel

`fbq('trackCustom', 'setupEvent', ...)` includes available non-contact `wegive_*` context. See [Common checkout data](/external/onboarding/tracking/context) for the field definitions. This is a setup event; these additions do not automatically send a browser `Purchase` event or initialize Pixel Advanced Matching.

## Server Purchase payload

The server sends a JSON request containing `data` (an array with the event below), `access_token` (the configured server credential), and optional `test_event_code` when configured. The credential stays on the server and is not published in the browser data layer.

| Field | Data |
| - | - |
| `event_name` | `Purchase` |
| `event_time` | Unix timestamp in seconds |
| `event_id` | Bare WeGive transaction ID as a string |
| `action_source` | `website` |
| `event_source_url` | Source URL when available; optional |
| `user_data` | Available attribution fields and independently enabled donor matching fields below |
| `custom_data` | Conversion facts and session context below |

`custom_data` includes `value` in major currency units, `currency`, `frequency`, `is_anonymous`, `fee_covered`, and optional `campaign_id`.

`value` is the transaction amount divided by 100 and rounded to two decimal places. `currency` is the organization's uppercase currency, falling back to `USD`. `frequency` uses the plan's frequency only for a recurring plan's first installment; a renewal, missing installment index, or one-time gift reports `once`.

Server CAPI `custom_data` includes `checkout_session_uuid`, `organization_id`, `organization_brand_id`, `checkout_id`, `checkout_test_id`, `designation_id`, `scheduled_donation_id`, `transaction_status`, and `correlation_id`. It uses the attribution-session lookup, including a recurring renewal's originating session. Missing session-dependent values are null. The donor-sharing setting affects server matching fields; it does not control these non-contact facts, event IDs, amount conventions, conversion eligibility, or retries.

## Donor matching fields

**Share donor contact information** is an on/off toggle:

* **On:** include the available donor matching fields listed below in server Purchase events.
* **Off:** omit those donor matching fields.

| Donor field | CAPI `user_data` key |
| - | - |
| Email | `em` |
| Phone | `ph` |
| First name | `fn` |
| Last name | `ln` |
| Birthdate | `db` |
| Donor UUID | `external_id` |

These values are normalized and SHA-256 hashed at send time, with each hash sent in an array. Missing values are omitted. CAPI does not have an expanded donor-profile mode: this setting does not add company name, mailing address, or billing address. See [Donor details & sharing](/external/onboarding/tracking/donor-sharing) for the separate GTM and Tealium browser field contract.

Turning sharing off does not disable the integration or remove the attribution fields below. They are sent unhashed when available.

| CAPI `user_data` key | Data |
| - | - |
| `fbp` | Browser identifier |
| `fbc` | Click identifier |
| `client_ip_address` | Client IP address |
| `client_user_agent` | Browser user-agent string |

Non-contact conversion context, Global Privacy Control handling, conversion eligibility, retries, and event-ID correlation operate independently of donor sharing. The setting does not enable automatic browser Purchase events, Pixel Advanced Matching initialization, or a browser Meta donor view.

## Correlate browser and server events

If your organization configures a browser Purchase, use the same event name and bare transaction-ID string as the server `event_id` for deduplication. Do not use a checkout-session UUID or prepend a registration prefix to a donation's transaction ID. The standard GTM/Tealium event catalog does not itself add a browser Pixel Purchase sender.

CAPI is a separate server delivery path, not a Tealium event. [Browser outcome events](/external/onboarding/tracking/standard-events#select-the-reporting-signal) distinguish a successful payment from a recurring-plan creation; count those as separate measures.

## Delivery conditions

The sender requires an enabled integration, a configured access token, an existing transaction, and transaction status Success (`2`). It skips a send when the originating checkout session records Global Privacy Control. The event timestamp uses the transaction's success time, falling back to its creation time.

The queued job allows up to five attempts with backoffs of 60, 300, 900, and 3,600 seconds. Retries reuse the transaction's `event_id`. These server retries are separate from Tealium's browser queue and from organization webhooks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.