Setting Up Meta CAPI Through a Server Container

Routing Meta Conversions API events through server-side GTM, with the deduplication and matching details that decide whether it works.

Running the Meta Conversions API through a server container is a common setup and a good one. The container receives events from the browser, enriches them, and forwards them to Meta server to server.

The configuration is not hard. The details that decide whether it actually improves anything are easy to get wrong.

The architecture

Browser sends events to your server container on your own subdomain. The container has a Meta tag that forwards to the Conversions API. You typically keep the browser pixel running as well, so events arrive by both routes.

That redundancy is deliberate. The browser event is fast, the server event is reliable, and deduplication keeps you from counting both.

Deduplication first

Before you turn anything on, decide how deduplication works. Both copies of each event need the same event_id and the same event_name.

Generate the ID once, from something stable like the order ID, and use it in both places. Do not let the browser and the server each generate their own. Full detail in deduplicating CAPI and browser events.

Turn on one event, verify deduplication in Events Manager, then add the rest. Turning everything on at once and discovering your purchases doubled is how these projects get cancelled.

Match quality

Meta scores how well it can match your events to people. Higher match quality means better attribution and better optimisation.

The server container is the right place to improve this, because you can add identifiers the browser does not have:

  • hashed email from the order record

  • hashed phone number, in E.164 format

  • first and last name, hashed

  • city, postcode and country from the shipping address

  • the Facebook click ID and browser ID cookies, which the browser does have

Send everything you legitimately hold. Each identifier improves the match rate, and the improvement compounds. See fixing Meta event match quality.

Normalisation

Meta specifies exactly how each field should be normalised before hashing. Lowercase, trim whitespace, phone numbers with country code and no punctuation.

Get this wrong and the hash will not match, silently. Do the normalisation in a transformation so it happens consistently for every event rather than being reimplemented per tag. See server-side transformations.

The click ID cookies

Meta sets _fbc and _fbp cookies in the browser. These are strong matching signals and they must be passed to the server container so the tag can include them.

If they are missing, your match quality drops noticeably. Check the incoming event data in server preview and confirm both are present.

Consent

The Meta tag must respect consent. A server container forwarding conversion data for users who refused marketing cookies is a compliance problem, and it is invisible from the outside.

Configure consent requirements on the tag and enforce it at container level too. See consent in a server-side setup.

Verifying

Events Manager shows event match quality, deduplication rates and any warnings. Check all three a week after launch.

A setup that is receiving events, deduplicating most of them, and showing improved match quality is working. One with a high event count and near-zero deduplication is double counting, and you should fix it before it teaches the algorithm anything.

If you would rather have this done for you, here is the offline conversion tracking service, or just get in touch and I will take a look at your setup.

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