How-to
Meta Pixel + Conversions API in GTM (Deduplicated the Right Way)
The Meta Pixel alone misses a growing share of conversions, blocked by ad blockers, browser privacy, and consent. Pairing the browser pixel with the Conversions API (CAPI), and deduplicating the two with a shared event id, is how you get reliable signal back. Here's the setup in GTM.
Why you need both the Pixel and CAPI
They're two paths for the same event. The Pixel sends from the browser; the Conversions API sends server-to-server. Browser sends get blocked or dropped; server sends are resilient but lack some browser context. Run both and you cover each other's gaps, as long as you dedupe.
Step 1: the Meta Pixel in GTM
- Add the Meta Pixel base code (or the community template) firing on all pages.
- Fire standard events (
Purchase,Lead,AddToCart) fromdataLayerevents, mapping value, currency and contents from variables. - Generate a unique
event_idper event and pass it with the Pixel event.
// One event_id, used by BOTH the Pixel and the server event → dedup
dataLayer.push({
event: "purchase",
value: 129.0,
currency: "USD",
event_id: "evt_10492" // reuse this exact id server-side
});Step 2: the Conversions API
Two common ways to send the server event:
- Server-side GTM: forward the event from a server container to Meta, including the same
event_id. Most control, needs a server container. - A direct/partner integration: Meta's integrations (e.g. via your platform or a gateway) send server events for you; you still align the
event_id.
The dedup rule
event_id on the browser Pixel event and the server CAPI event. Meta uses it to recognize they're the same conversion and counts it once. Mismatched or missing ids → double-counting.Practice this on a real container
Install the Meta Pixel template and fire a standard event with value and an event_id (on your own container, debugged in Tag Assistant), then layer the server side on top.
Practice the Meta Pixel →Match quality and consent
- Send customer information parameters (hashed email/phone) to raise Meta's event match quality, hashed, with consent.
- Respect consent. Gate both the Pixel and CAPI on the user's marketing consent; CAPI sending server-side doesn't exempt it from consent rules.
- Keep raw PII out of analytics. Hashing for CAPI is purpose-specific; it isn't a reason to leak PII elsewhere.
Verify with Meta's tools
Use Meta Events Manager → Test Events and the diagnostics tab. You're looking for each conversion to show as received from both browser and server, and marked as deduplicated, that's the signal your event_id is aligned.
Now go practice it
Reading sticks when you do it. These hands-on lessons load your own GTM container and let you debug in Tag Assistant.
Frequently asked questions
Why use the Meta Conversions API alongside the Pixel?
The browser Pixel gets blocked by ad blockers, browser privacy features and consent denials, so it misses conversions. The Conversions API sends server-to-server and is more resilient. Running both covers each other's gaps, as long as you deduplicate them with a shared event_id so Meta counts each conversion once.
How does Meta event deduplication work?
You send the same event_id on the browser Pixel event and the server Conversions API event. Meta uses the matching event_id (alongside the event name) to recognize they're the same conversion and counts it a single time. Missing or mismatched ids cause double-counting.
How do I send the Conversions API event from GTM?
The most controllable way is server-side GTM: forward the event from a server container to Meta, including the same event_id used by the browser Pixel. Alternatively, a partner or platform integration can send the server events for you while you keep the event_id aligned.
Does the Conversions API need consent?
Yes. Sending server-side does not exempt CAPI from consent requirements. Gate both the Pixel and the Conversions API on the user's marketing consent, and only send hashed customer information the user provided.
Related posts
How-to
How to Set Up Google Tag Manager on Shopify (Storefront + Checkout)
Shopify GTM is two jobs, not one: the storefront installs normally, but the sandboxed checkout needs a custom pixel. The full storefront + checkout setup, GA4 mapping and testing.
Read →How-to
How to Track Form Submissions in Google Tag Manager (Without Losing Conversions)
Form submissions are leads, and the easiest tracking to get wrong. Three reliable methods, plus the redirect gotcha that silently loses conversions and how to beat it.
Read →How-to
How to Set Up GA4 Ecommerce Tracking with Google Tag Manager
GA4 ecommerce is one pattern repeated across a few events. Walk the full funnel in GTM (from the base tag to a deduplicated purchase with revenue) with copy-paste dataLayer examples.
Read →About the author

Analytics & Tag Management Consultant
Nathan Gage got his start in marketing through Google Tag Manager. Seeing how tracking customer behavior could turn raw clicks into insight you can actually act on is what pulled him into the field. Since then he has worked both full time and as a consultant with 15 marketing agencies, supporting brands that spend anywhere from a thousand dollars a month to over a million. Along the way he built a multi-touch attribution app, and he created The Happy Tagger so anyone can practice GTM, GA4 and server-side tracking on a real container instead of a production site.