Meta Pixel & Conversions API: The Setup
Pixel plus Conversions API with deduplication. The destination where server-side setups have to prove themselves first.
Event setup at a glance
- Browser tag
- Meta Pixel
- Server-side API
- Conversions API (CAPI)
- Recommended path
- Hybrid: browser + server-side with deduplication
- Deduplication
- Yes, via event IDs
Identifiers
| Identifier | Source | Used by | Sensitivity | Consent note | Storage location | Retention |
|---|---|---|---|---|---|---|
event_id | Web container, generated per event | Pixel, CAPI | Technical, no PII | Part of the marketing payload, sent only after consent. | Not persisted | One-off per event |
fbp | Meta cookie (first-party) | Pixel, CAPI | Pseudonymous | Cookie is set only after marketing consent. | First-party cookie | Around 90 days browser-side |
fbc | Click URL (fbclid), persisted as a cookie | Pixel, CAPI | Pseudonymous | Persisted only after marketing consent. | First-party cookie | Around 90 days browser-side |
em (SHA-256) | Form or checkout, hashed in the server container | CAPI | PII, send hashed only | Advanced Matching needs its own consent basis. | Never persist in clear text | Per internal deletion policy |
ph (SHA-256) | Form or checkout, hashed in the server container | CAPI | PII, send hashed only | Advanced Matching needs its own consent basis. | Never persist in clear text | Per internal deletion policy |
Event mapping
| Event | Meaning | Browser tag | Server API | Recommended parameters | Required for optimization | Common mistake |
|---|---|---|---|---|---|---|
PageView | Page view, base for reach audiences | Yes | Yes | event_id | No | — |
ViewContent | Product view in the shop | Yes | Yes | event_idcontent_idsvaluecurrency | No | — |
AddToCart | Item added to cart | Yes | Yes | event_idcontent_idsvaluecurrency | No | Without content_ids, catalog audiences stay empty. |
InitiateCheckout | Checkout started | Yes | Yes | event_idvaluecurrency | No | — |
Purchase | Paid order, net revenue | Yes | Yes | event_idvaluecurrencycontent_ids | Yes | Missing event_id on one path, purchases count twice. |
Lead | Qualified enquiry | Yes | Yes | event_idem (SHA-256) | Yes | — |
Consent constraints
- Fires only with marketing consent; the CMP signal has to gate the pixel AND the CAPI tag.
- PII reaches the API SHA-256-hashed only; hashing happens in the server container.
- Advanced Matching without consent is not a grey area, it is a violation.
Consent-aware routing assumed. Privacy fit depends on the concrete setup; the legal assessment stays with your privacy team (legal review required).
Implementation methods
- Browser pixel via GTM Web, CAPI tag in the GTM Server-Side container
- Event-ID generation in the web container, passed to both paths
Debugging checklist
- Meta Events Manager Test Events
- sGTM preview mode
Common mistakes
- Missing event_id on one of the two paths, purchases count twice.
- CAPI without CMP wiring, the server path fires past the consent decision.
- Unhashed emails in the payload; Meta rejects them or worse, accepts them.
Runs on (our setups)
A fit when
- Meta is a core channel and iOS losses visibly depress the numbers.
- A server container already runs or is planned anyway.
- E-commerce with clear purchase events and order IDs.
Not a fit when
- The CMP base is not in place yet; consent first, then CAPI.
- Meta budget is marginal and the pixel alone covers the need.
What this destination is about
Meta Ads is not software we review; it is a destination your tracking has to deliver into cleanly. Three things decide the outcome: deduplication via event IDs, match quality via hashed identifiers, and a CMP signal that gates both paths.
The setup above is our standard from DACH projects. Infrastructure details live on the linked GTM Server-Side and stape.io pages; how Meta sits against the other platforms is on the ad platform hub.
For a self-run QA pass: the Consent Mode audit checklist, the CMP QA template, and the consent mapping worksheet.
Sources
- Meta Conversions API documentation (accessed 2026-07-03)
Related services
Topical context
- Meta Conversions API setup
- Meta Pixel server-side
- CAPI deduplication
Do your conversions actually arrive in the ads platforms? The Paid Media Tracking Audit settles it.
Request a Paid Media Audit →Does the Conversions API replace the pixel?
No, it complements it. The hybrid setup of pixel plus CAPI with deduplication delivers the best signal quality; server-only is the exception for app and offline events.
More integrations we work with
- Ads & Conversion APIsGoogle AdsEnhanced Conversions plus Consent Mode V2. The destination where consent mistakes cost budget directly.
- Ads & Conversion APIsTikTok AdsPixel plus Events API with event_id deduplication. Match quality stands and falls with ttclid and hashed identifiers.
- Ads & Conversion APIsLinkedIn AdsInsight Tag plus Conversions API for B2B funnels. The destination where lead events matter more than carts.
- Ads & Conversion APIsCriteoRetargeting lives on product context. OneTag in the browser stays the default path; server-to-server is the exception.
- Ads & Conversion APIsOutbrainNative ads with postback logic. Server-to-server over the click ID is the sturdier path here, not the exception.
- AnalyticsGoogle Analytics 4 (GA4)The web analytics standard with a huge ecosystem. Free including BigQuery export, but consent-dependent and US cloud.