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
Get your server container running on your own subdomain. If you have not, start with
Add the Meta CAPI tag to your server container from the template gallery.
Connect your access token from Meta Events Manager and enter your pixel ID.
Map the event ID from the incoming event data. This is the field people leave blank.
Map the customer data, email, phone, name, city, postal code, country, plus the Meta click ID.
Confirm the browser Pixel sends the same event ID on the same event.
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,
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.























