How to Set Up Meta CAPI With Server Side GTM and Deduplication

Running Pixel and CAPI together doubles your numbers unless deduplication is right. Here is the setup, and how to confirm it actually works.

Running the Meta Pixel and the Conversions API together is the right setup. It is also the setup that most often reports double the purchases anyone actually made.

The difference between the two outcomes is deduplication, and it hinges on one field.

Why run both

The Pixel is fast and carries browser context, but it gets blocked, restricted, and consent limited. CAPI is reliable and carries richer customer data, but on its own it misses browser signals Meta finds useful.

Together you get coverage from CAPI and context from the Pixel. Meta explicitly recommends this. The only condition is that Meta must be able to tell when the two are describing the same event.

The two fields that make deduplication work

Both sources must send:

  • The same event name. Purchase and purchase are not the same to Meta. Match them exactly.

  • The same event ID. A unique value per event, identical across both sources.

For a purchase, the order ID is the natural event ID. It is unique, it already exists, and both the browser and your server know it.

Get either wrong and Meta counts both events. It does not warn you. Your numbers simply look better than they are.

Image: diagram showing browser Pixel and server CAPI both sending a purchase with the same event ID, converging on one deduplicated event in Meta.

Generating the event ID

For purchases this is easy. Use the order or transaction ID.

For events with no natural ID, like add to cart or page view, generate one in the browser and pass it through to the server with the event. Do not generate it separately in each place, because then they will never match.

That is the most common implementation bug. Two random IDs, generated independently, both valid, never matching.

Setting it up in server side GTM

  1. Get your server container running on your own subdomain. If you have not, start with

  2. Add the Meta CAPI tag to your server container from the template gallery.

  3. Connect your access token from Meta Events Manager and enter your pixel ID.

  4. Map the event ID from the incoming event data. This is the field people leave blank.

  5. Map the customer data, email, phone, name, city, postal code, country, plus the Meta click ID.

  6. Confirm the browser Pixel sends the same event ID on the same event.

the subdomain setup guide.

Do not drop the Pixel

A tempting shortcut is to remove the browser Pixel entirely and avoid deduplication altogether.

It works, and you lose things. Browser signals help Meta with attribution and audience building, and some features expect Pixel data. Coverage also gets worse for events that never reach your server.

Keep both. Do deduplication properly instead of avoiding it.

Verifying, in three layers

Layer one, Test Events

Open Test Events in Events Manager and complete a real purchase. You should see the event arrive twice, once from Browser and once from Server, with a note that they were deduplicated.

Two separate events with no deduplication note means your IDs do not match.

Layer two, the event ID itself

Expand the received event and look at the event ID from each source. They must be identical strings. Not similar. Identical.

Layer three, the numbers

After a few days, compare Meta purchases against real orders. Meta will report more, because of attribution windows and modeling. It should not report roughly double, which is the signature of failed deduplication.

Match quality comes along for the ride

While you are in here, send every customer parameter you have. CAPI is where the good data can go, and match quality drives everything downstream.

Normalize before hashing. Lowercase, trim, strip punctuation from phone numbers, add country codes. If your score is stuck,

this covers what moves it.

Need this built properly?

If you have Pixel and CAPI both running and nobody has verified deduplication, your reported purchases may be roughly twice reality. I set up and repair tracking for ecommerce stores and lead generation businesses, so the numbers in your ad accounts match the money in your bank account.

Have a look at what I do, or book a call and we can go through your setup together.

Need accurate tracking?

Its Free

500+ Happy Clients ⭐️

Keep Reading

See exactly where you’re wasting ad spend and how better tracking can double your sales.

See exactly where you’re wasting ad spend and how better tracking can double your sales.

Tracking in 3 Hours

Tracking in 3 Hours

I Manage Everything

I Manage Everything

24/7 Expert Support

24/7 Expert Support

TESTIMONIALS

Trusted by 500+ satisfied clients

Discover how we’ve driven growth and innovation.

500+ Tracking

500+ Tracking

Adélaïde De Vos

3,922 followers

I had the pleasure to work with Abdul and I can say that he exceeded my expectations. He was professional, patient, and clear in his explanations and committed to client satisfaction. If you're looking for someone who is not only highly skilled but also reliable and committed to client satisfaction, I highly recommend Kayium!

Dean Watson

1,030 followers

Kayium setup our tracking for Google Ads and Meta Ads, which helped us get 20%+ more conversions on the same ad spend. He didn’t just handle the technical setup,he also took the time to explain why it works and how it improves results. If you’re looking for someone skilled, reliable, and committed to delivering real results, I highly recommend him!

David Friend

CEO: Profitable Sites

Kayium set up accurate tracking that helped us scale ads fast and boost conversions by over 25%. He gave us clear insight into which ads drive revenue.

Lalita Sundari

7,924 followers

I've worked with Kayium; his strategic mindset and expertise in GTM, GA4, Pixel & Server Side Tracking, are invaluable! I highly recommend Kayium!

© 2026 Abdul Kayium

Owned by Kayium

© 2026 Abdul Kayium

Owned by Kayium