Server-side events · Setup reference
Facebook Conversions API (Actions) destination in Twilio Segment checker
Segment's Facebook Conversions API (Actions) destination maps Segment track, page and identify calls to Meta server events, with prebuilt actions such as Purchase triggered by 'Order Completed'. Segment normalises and SHA-256 hashes customer fields for you. The Event ID field defaults to the Segment messageId, and the Facebook Pixel destination also uses messageId as eventID, so browser and server dedupe only when both come from the same Segment message. Action Source has no default and must be set.
Read from the official documentation on 9 November 2026. Sources are listed at the end.
Check your own setup
Good fit if you paste the outgoing Conversions API body (or build a sample from your mapping). It checks action_source, the 7-day event_time window, that em/ph are hashed, that fbc/fbp are present and well formed, that event_id is present, and value/currency on Purchase. It cannot read your Segment mappings or tell whether the pixel used the same messageId.
Open the Meta CAPI Event CheckerEndpoint and authentication
POST https://graph.facebook.com/{API_VERSION}/{PIXEL_ID}/events
Authorise the Segment partner connection in Meta Events Manager ('Authorize Segment Connection'), then enter Pixel ID (or dataset ID) in the destination settings.
Standard event names
Spelled exactly as Segment + Meta expects them. A near miss is treated as a different event.
| Event | Use it for |
|---|---|
| Purchase | default trigger: track event 'Order Completed' |
| AddToCart | Add to Cart action; default trigger: track 'Product Added' |
| InitiateCheckout | default trigger: track 'Checkout Started' |
| ViewContent | default trigger: track 'Product Viewed' |
| Search | default trigger: track 'Products Searched' |
| PageView | Page View action; default trigger: type = page |
| CompleteRegistration | no prebuilt action: use Custom Event with the literal event name 'CompleteRegistration' |
| Custom Event | any standard or custom Meta event name you type |
Required and recommended fields
| Field | What it needs |
|---|---|
| Pixel ID | destination setting, required; a dataset ID also works |
| Action Source | required on the action. It has no default mapping, so pick a value such as website. |
| Event Time | required; default maps to the Segment timestamp ($.timestamp) |
| Event Source URL | required if action source is website; default mapping $.context.page.url, so server-library calls must include context.page.url |
| client_user_agent | required by Meta when action_source = website; default $.context.userAgent |
| Currency / Value | Purchase action: currency defaults to $.properties.currency, value to $.properties.revenue |
Match keys and hashing
| Key | Normalise and hash |
|---|---|
| External ID | Segment hashes it with SHA-256 (whitespace removed, lowercased). Default: userId, else anonymousId. |
| Email / First Name / Last Name | Segment removes whitespace, lowercases, then SHA-256 |
| Phone / Zip Code | Segment removes whitespace, then SHA-256 |
| Gender | lowercased; male -> m, female -> f; SHA-256 |
| State / Country | mapped to 2-letter ANSI state / ISO 3166-1 alpha-2 country, then SHA-256 |
| Date of Birth | no formatting applied, then SHA-256; send YYYYMMDD yourself |
| client_ip_address / client_user_agent | not hashed; defaults $.context.ip and $.context.userAgent |
Click ids
| Click id | Where it comes from |
|---|---|
| fbc | Not hashed. Default mapping is $.properties.fbc, so you must read the _fbc cookie in the browser and pass it on the event yourself. |
| fbp | Not hashed. Default mapping is $.properties.fbp (from the _fbp cookie). |
Deduplication
- Event ID field: 'Event ID is used to deduplicate events sent by both Facebook Pixel and Conversions API'; its default mapping is $.messageId.
- Segment's Facebook Pixel destination sets messageId as the pixel eventId, so a single analytics.js call delivered to both destinations deduplicates. A separate server-side track call has a different messageId and will not.
- Meta matches on event name + event_id within 48 hours; Segment also lets you map fbp/external_id for Meta's fallback method.
- If browser and server send different events (e.g. Purchase only from the server), Segment notes no dedup is needed.
Time limits and batch sizes
- Event Time accepts Unix seconds; Facebook converts ISO 8601 timestamps automatically.
- Meta rejects a request if any event_time is more than 7 days old, which matters for replays or delayed server sources.
- Segment says events should appear in Events Manager about twenty minutes after sending.
How to test before you trust it
- Test Event Code: Set it in destination settings or per mapping (the mapping value overrides). Copy it from Events Manager > Test events, and remove it for real traffic.
- Events Manager Overview: Look for events whose Connection Method is Server
- Event Match Quality: Check EMQ in Meta Events Manager when sending server-only
Why events arrive but don't attribute
- Action Source has no default mapping. Meta requires action_source on every Conversions API event, and Segment warns that events missing required parameters may not be available for optimization, targeting or measurement.
- Server-side Segment calls need context.page.url and context.userAgent filled in (the default mappings for Event Source URL and client_user_agent), or website events lack fields Meta requires.
- Double hashing: if you pre-hash email/phone before sending to Segment, Segment hashes again and matching fails. Send raw PII.
- fbc/fbp default to properties.fbc / properties.fbp, which are empty unless you copy the cookies onto the event.
- Dedup against the Facebook Pixel destination only works for the same Segment message (messageId). Server-originated duplicates of browser events need a shared custom Event ID.
- Leaving the Test Event Code in destination settings after launch.
Sources
- Twilio Segment docs: Facebook Conversions API (Actions) destination
- GitHub segmentio/action-destinations: facebook-conversions-api shared/fields.ts (default mappings)
- Meta for Developers: Handling duplicate pixel and Conversions API events
- Meta for Developers: Server event parameters
Platforms change these rules without notice. If a source says something different from this page, the source wins.