Meta Pixel alone captures only 50-60% of real conversions in 2026. The rest is blocked by ad blockers (around 49% usage in Germany), iOS App Tracking Transparency and Safari Intelligent Tracking Prevention. The solution is Meta's Conversions API (CAPI): a server-side data stream parallel to the Pixel, with event_id deduplication so nothing is counted twice.

This guide walks through the clean setup via Server-Side GTM in five steps: Pixel configuration with event_id, CAPI tag in the server container, hash PII correctly (SHA-256), verify deduplication and optimize EMQ score to 8.0+. In 2026, advertisers with EMQ above 8.0 see measurably 15-25% better attributed conversion rates.

Prerequisite: Server-Side GTM container is already running. If not: walk through the Stape.io setup guide first (30 minutes). For the background on why server-side: the pillar article on Server-Side Tracking.

1. What Meta CAPI is (Pixel vs CAPI)

The Meta Pixel is client-side: a JavaScript snippet in your user's browser that reports conversions to Meta. Worked for years - but in 2026 has big gaps: ad blockers filter it out, iOS ATT limits cross-app tracking, Safari ITP caps cookies at 7 days. On average advertisers lose 30-40% of real conversion data with Pixel-only tracking.

The Conversions API (CAPI) is the server variant. Instead of the browser, your server reports the conversion directly to Meta - independent of the browser. Best practice in 2026 is NOT "Pixel or CAPI" but both in parallel: Pixel delivers browser signals (fbp, fbc cookie IDs, user-agent), CAPI delivers data safety when Pixel is blocked. To prevent double counting, Pixel and CAPI share a common event_id deduplication.

Why Server-Side GTM and not just Pixel + CAPI directly?

You can fire Pixel + CAPI in parallel from the Web container directly. But: if the Web container gets blocked by an ad blocker, BOTH go down - Pixel AND CAPI. With Server-Side GTM the CAPI tag runs on your server (own subdomain), completely independent of browser JavaScript. That is the decisive advantage.

2. Understanding EMQ - the 1-10 score

Event Match Quality (EMQ) is Meta's internal scoring metric in Events Manager. A score from 1 to 10 measuring how well Meta can match your incoming events to user profiles.

EMQ scale (simplified):
- Score 6.0 = roughly 60% of sent events are matched
- Score 8.0 = roughly 80% match rate
- Score 9.0+ = roughly 90%+ match rate

Advertisers with EMQ > 8.0 see measurably 15-25% better attributed conversion rates in 2026 compared to advertisers with EMQ < 6.0.

What affects the score? The number and quality of user identifiers per event. Hashed email moves the score most - more than any other field. After that: hashed phone, fbc (Facebook Click ID), fbp (Facebook Browser ID), client_ip_address, client_user_agent. Additional boosters: city, state, zip, first_name, last_name, external_id.

Important about fbp / fbc on Safari: these cookies get deleted by Safari ITP after 7 days in a standard subdomain sGTM setup - which tears down your EMQ score for Safari users. To avoid this: bypass Safari ITP with Same-Origin sGTM (cookie lifetime goes from 7 to 400 days).

3. Prerequisites

  • Server-Side GTM container running with own subdomain (e.g. data.yourdomain.com). If not yet: Stape setup guide.
  • Meta Business Manager access with Editor rights
  • Pixel ID from Events Manager
  • CAPI Access Token from Events Manager (Settings → Conversions API → Generate Access Token)
  • Test Event Code for the validation phase (Events Manager → Test Events → browser test code)
  • Consent Mode v2 already configured in Web container

4. Step 1: Pixel + event_id in Web container (10 min)

The foundation of deduplication: Pixel and CAPI must send the same event_id per conversion. Best practice: generate once in the Web container, then pass to both streams (Pixel client-side + sGTM routing for CAPI).

4.1 Create event_id variable in Web container

Variable type: Custom JavaScript. Code:

dataLayer Push
function() {
  // event_id = timestamp + random suffix (collision-safe)
  return Date.now() + '-' + Math.random().toString(36).substring(2, 11);
}

Save as js-eventId.

4.2 Configure Pixel tag

In your existing Facebook Pixel tag (for Purchase, Lead etc.):

  • Event Parameter: eventID → Value: {{js-eventId}}
  • Important: NOT as "event_id" - the Pixel tag expects the field as eventID (camelCase).

4.3 Configure server-routing tag

So the same event_id reaches the server: GA4 Event Tag (or another trigger tag routing to the server) configured with Field-to-Set event_id = {{js-eventId}}.

Publish the Web container.

5. Step 2: Meta tag in sGTM container (15 min)

You need a Facebook Conversions API Tag in the server container. Several templates available - recommended: the community template by gtm-templates-simo-ahava or the official Stape template (available free in the Stape Power-Up Marketplace).

5.1 Install template

  • sGTM container → Templates → Search Gallery
  • Install "Facebook Conversions API Tag" (by Stape or Simo Ahava)

5.2 Configure tag

  • Pixel ID: from Events Manager
  • API Access Token: from Events Manager → Conversions API
  • Test Event Code: for the test phase (e.g. TEST12345)
  • Event Name: dynamic via variable (e.g. {{Event}})
  • Event ID: {{event_id from event data}} - comes from Web container routing
  • User Data: configured in Step 3

5.3 Set trigger

Custom Event trigger in the server container reacting to events from the Web container (Pageview, Purchase, Lead etc.).

6. Step 3: Hash user data (PII) (10 min)

Never send raw PII (email, phone, name) to Meta. GDPR requirement and Meta requires it too: all PII must be SHA-256 hashed.

Watch out for the Google Ads difference: with Meta CAPI you must hash yourself - with Google Ads Enhanced Conversions however, you send plaintext and Google's tag hashes itself. People running both setups frequently get this wrong - it's the most common configuration mistake.

6.1 Hashing strategy

Three options for where hashing happens:

  1. In the browser (Web container, before dataLayer push): safest variant - raw PII never leaves the browser. Hash with e.g. SubtleCrypto API.
  2. In the server container: the CAPI tag itself hashes automatically if unhashed PII comes in. Practical, but raw PII briefly sits in sGTM memory.
  3. On the server application (backend): for server events without browser (e.g. CRM events) - hashing in backend before sending to sGTM.

6.2 Which fields to map?

FieldHash?EMQ impact
em (Email)SHA-256⭐ very high
ph (Phone, E.164)SHA-256high
fn (First name)SHA-256, lowercasemedium
ln (Last name)SHA-256, lowercasemedium
ct (City)SHA-256, lowercasemedium
zp (ZIP)SHA-256medium
countrySHA-256, lowercase ISO2low
external_idSHA-256medium - high (CRM match)
fbc, fbpdo NOT hashhigh (cookie match)
client_ip_addressdo NOT hashlow - medium
client_user_agentdo NOT hashlow - medium

7. Step 4: Verify deduplication (5 min)

Now the critical test: does Meta recognize that Pixel event and CAPI event are the same conversion?

  1. Open Events Manager → select Pixel → Test Events tab
  2. Append Test Event Code to URL (or it's already set in the tag)
  3. Trigger a test conversion (test purchase, test lead etc.)
  4. In Test Events both events should appear:
    • Browser event (Pixel) with browser icon
    • Server event (CAPI) with server icon
  5. If deduplication works: "Deduplicated" label appears - that is the signal.
Important: if the Deduplication label is missing, check the event_id value on both sides. Common mistakes: event_id is generated in the Web container but not passed to the server container, or different event names (Pixel sends "Purchase", server sends "purchase" - case-sensitive).

8. Step 5: Check EMQ score (3 min)

EMQ is often low after setup (3.0-5.0) because tests send few fields. You'll see the real EMQ only with real traffic, about 24-48 hours after going live.

  1. Events Manager → select Pixel → Diagnostics tab
  2. View "Event Match Quality" per event
  3. Target: 8.0 or higher

9. Push EMQ score to 8.0+

If EMQ is below 7.0, optimize in this order:

  1. Include hashed email on EVERY event - moves the score most
  2. fbp and fbc cookies from browser to server event (should happen automatically via sGTM - verify)
  3. client_ip_address and client_user_agent sent from HTTP headers
  4. If available: add hashed phone
  5. If available: external_id (CRM customer ID) for recurring customers
  6. Geographic data (city, zip, state) only if you ALREADY have them - don't ask for them extra

10. Common issues & fixes

ProblemFix
No "Deduplicated" labelCompare event_id values. Pixel uses eventID (camelCase), CAPI uses event_id (snake_case) - different spellings, same value.
Conversions double up in Ads ManagerDeduplication isn't working. Check Test Events tool.
EMQ stays below 5.0Too few identifiers. Send at minimum hashed email + fbp/fbc.
"InvalidEvent" in Test Events tabRequired fields missing: event_name, event_time, action_source, at least 1 User Data field.
Pixel fires, CAPI doesn'tTurn on Server container Preview mode. Check in server container if the event arrives + which tag fires.
CAPI tag missing from sGTM template galleryActivate Stape Power-Up "Facebook Conversions API Tag" or import from Simo Ahava's GitHub.

11. GDPR + data minimization

Meta CAPI is GDPR-compliant if implemented correctly. Minimum standards:

  • Consent Mode v2 active: no CAPI event without consent
  • SHA-256 for all PII: email, phone, name, city - never raw
  • Data minimization (Art. 5(1)(c) GDPR): only what you need. external_id only if you already have it.
  • DPA with Meta: Data Processing Agreement under Art. 28 GDPR
  • Privacy policy mentions CAPI usage and Meta as data recipient
  • EU region for your Stape server (Frankfurt) - data stays in EU before going to Meta

12. FAQ

What is the difference between Pixel and CAPI?

The Meta Pixel fires client-side in the browser - it is blocked or limited by ad blockers, iOS ATT and Safari ITP. CAPI is server-side: your server sends conversion data directly to Meta. Best practice is not "Pixel OR CAPI" but both in parallel with event_id deduplication. Pixel delivers browser signals (fbp, fbc), CAPI provides data safety when browser tracking fails.

What is Event Match Quality (EMQ)?

EMQ is a score from 1 to 10 in Meta Events Manager that measures how well Meta can match your server events to user profiles. A score of 6.0 means roughly 60% match rate, 9.0 corresponds to about 90%. In 2026, advertisers with EMQ above 8.0 see measurably 15-25% better attributed conversion rates. Hashed email moves the score most.

How does event_id deduplication work?

For Meta to recognize that a Pixel event and a CAPI event are the same conversion, both must send identical event_id. Same event name (e.g. Purchase), same event_id, similar timestamps. In Events Manager Test Events a "Deduplicated" label appears - that is the signal it works. Without deduplication conversions are counted twice and bidding optimizes on inflated data.

Do I need CAPI if Meta Pixel works?

Yes - in 2026 more than ever. The Pixel alone captures only 50-60% of real conversions due to ad blockers (49% usage in Germany), iOS ATT and Safari ITP. CAPI fills this gap server-side. Without CAPI, Meta Advantage+ optimizes on a distorted picture and you pay for performance you can't see.

Is CAPI GDPR-compliant?

When implemented correctly: yes. Requirements are Consent Mode v2 (tags blocked without consent), data minimization (only what you need), SHA-256 for all PII (email, phone, name), DPA with Meta and EU server region. Sending raw unhashed data is not permitted - always hash.

What data should be in every CAPI event?

Required for high EMQ: hashed email, hashed phone, fbc (Facebook Click ID), fbp (Facebook Browser ID), client_ip_address, client_user_agent. Optional but EMQ-boosting: city, state, zip, country, first_name, last_name, external_id (Customer ID from your CRM). Hashed email alone moves the EMQ score most - if you can only add one field, that's the one.

Want CAPI set up cleanly?

I'll set up Meta CAPI via sGTM for you end-to-end - with event_id deduplication, PII hashing and EMQ optimization to 8.0+. Part of the Server-Side Tracking module from €400 or as a standalone add-on.

Request CAPI setup
Back to blog