Skip to content
All posts
Measurement

Meta CAPI Setup: A Step-by-Step Server-Side Tracking Guide (2026)

Published June 14, 2026

Last updated

Meta's Conversions API (CAPI) sends conversion events from your server directly to Meta, instead of relying only on the browser pixel that ad blockers and iOS routinely strip. This is the exact build DigiMinds ships on every account — and the reason our clients typically recover the 30–40% of conversions a browser-only pixel loses.

Why CAPI, and why server-side

The browser pixel is intercepted by ad blockers, Safari ITP, and iOS App Tracking Transparency before the event ever reaches Meta. CAPI moves the event to your server, where it cannot be blocked client-side. Run through a server-side Google Tag Manager (sGTM) container, you also control the payload, hashing, and timing.

The setup, step by step

  1. Stand up a server-side GTM container on your own subdomain (e.g. sgtm.yourdomain.com) via Stape or Google Cloud Run. First-party context survives here.
  2. Create a Conversions API connection in Meta Events Manager and generate an access token for the dataset (Pixel).
  3. Map events — Purchase, Lead, AddToCart, InitiateCheckout — from the web container to the server container.
  4. Hash and pass customer parameters (email, phone, name, IP, user agent, fbp, fbc) with SHA-256 to raise Event Match Quality (EMQ).
  5. Deduplicate with a shared event_id on both the browser pixel and the server event so Meta counts each conversion once.
  6. Verify in Events Manager: EMQ should climb toward 7–9/10, and the "received from server" share should rise within 48 hours.

The parameters that move Event Match Quality

ParameterImpact on EMQNotes
Email (hashed)HighStrongest single match key
Phone (hashed)HighNormalize to E.164 before hashing
fbc / fbp cookiesHighClick ID + browser ID; pass both
IP + User AgentMediumAlways available server-side
Name, city, zip (hashed)MediumAdds match coverage

What "good" looks like after the build

Once CAPI is live and tuned, you should see three things move. Event Match Quality climbs from the typical browser-only 3–5 range toward 7–9, which directly improves how well Meta can attribute and optimize. The share of conversions "received from server" rises, recovering volume the browser pixel was silently dropping. And measured ROAS lifts within two to four weeks — not because anything about your offer changed, but because the algorithm is finally relearning on a complete, accurate picture of who actually converts. Treat these three as your acceptance criteria: if EMQ has not risen and server share is flat after 48 hours, the build is misconfigured, and the most common culprit is missing fbc/fbp cookies or unhashed parameters being silently rejected.

Common mistakes

  • No deduplication — double-counted purchases inflate ROAS and corrupt optimization.
  • Sending raw PII — Meta requires SHA-256 hashing; unhashed data is rejected.
  • Forgetting fbc/fbp — these are the highest-leverage match keys and the most commonly dropped server-side.

FAQ

Does CAPI replace the Meta pixel?

No. Run both and deduplicate. The pixel still captures real-time browser signals; CAPI backstops what the browser loses.

How long until I see results?

EMQ improvements show within 48 hours. Smarter delivery and lifted measured ROAS typically follow within two to four weeks as the algorithm relearns on cleaner signal.

Is this compliant with privacy rules?

Yes, when run with consent gating and hashed data. We wire CAPI behind Consent Mode v2 so events respect user choices.

This is standard, not an upsell, on our Meta & Facebook Ads engagements. Want it audited on your account? Start a free 48-hour audit.

Reading about it is one thing. Seeing it in your account is another.

Get a free 48-hour audit and find out where this applies to you.