- Server-side Google Tag Manager receives events from your web container and forwards them to the Meta Conversions API from a server you control.
- You need Events Manager access, a GTM web container, a server container on a tagging server (often on your own subdomain) and a working GA4 setup.
- The browser pixel and the server tag must share one event_id, or Meta counts purchases twice.
- Most GTM setups still start in the browser: if the purchase event never fires on the thank-you page, the server never sees it.
- Sending purchases from the store's order data closes that last gap, and it can feed your server container too.
You can send events to the Meta Conversions API through Google Tag Manager by adding a server container: your website sends events to a tagging server you control, and a Meta tag in that server container forwards them to Meta. It works, and it gives you control over the data. But the purchase usually still starts as a browser event, so a GTM setup inherits part of the problem it is meant to solve.
This guide explains what the Conversions API does, why GTM is a popular way to run it, what you need before you start, the setup step by step, the pitfalls, and when sending purchases from your store's backend is the better route.
What the Conversions API does, in plain words
With only the Meta pixel, a purchase has to be reported by the shopper's browser. If the browser blocks the request, the tab closes early or the thank-you page never loads, Meta never hears about the sale. The Conversions API lets a server send the same event instead, so the browser is no longer the only messenger.
The important word is "send". The Conversions API does not discover purchases on its own: it only delivers what its source gives it. A server that forwards browser events is exactly as complete as those browser events. Our Conversions API guide covers the event format and parameters in depth.
Why teams use Google Tag Manager for the Conversions API
- One place for all tags. Marketing teams already manage GA4, Google Ads and Meta tags in GTM, without changing theme code for every change.
- A server you control. Server-side GTM runs in a cloud project (Google Cloud by default) and can be reached on your own subdomain, so requests look first-party to the browser.
- One stream, many destinations. A single event from the website can be forwarded to GA4, Meta and other platforms by tags in the server container.
- Data control. You can remove or transform fields in the server container before anything reaches a vendor.
What you need before you start
| What | Why |
|---|---|
| Admin access to your Meta business portfolio and Events Manager | To pick the dataset (pixel) and create an access token |
| Admin access to Google Tag Manager | To create and publish a web and a server container |
| A GA4 property with ecommerce events | The GTM route usually uses GA4 events (purchase, add_to_cart, begin_checkout) as the source |
| A server container with a tagging server URL | Hosted on Google Cloud or another host, ideally on a subdomain of your store |
| A way to read the order and customer data on the thank-you page | Value, currency, order id and contact details for matching |
| A consent setup that GTM can read | So tags only fire when the visitor allowed it, where the law requires that |
Step by step: Conversions API through server-side GTM
- Check your Meta dataset
In Events Manager, find the dataset (formerly called a pixel) that receives your website events, or create one. Browser and server events must go to the same dataset.
- Create the server container
In Tag Manager, create a container of the type Server and deploy it. Map a subdomain such as gtm.yourstore.com to it, so the browser sends events to your own domain.
- Point the web container at the server
In the GA4 configuration of your web container, set the server container URL as the place to send events. Check that purchase, add_to_cart and begin_checkout fire with value, currency and item data.
- Add the Meta tag to the server container
Use Events Manager's guided Google Tag Manager setup under partner integrations, or add Meta's Conversions API tag template from the community gallery yourself. Enter the dataset id and an access token, and map GA4 event names to Meta events (purchase to Purchase).
- Pass customer information
Send email and phone (the tag hashes them), the client IP address and user agent the server receives, and the _fbp and _fbc cookies. Without these, Meta matches few events.
- Share one event id
Generate an id once in the web container, send it as eventID with the pixel and as event_id with the server event. Build it from the order id for purchases.
- Test and publish
Use GTM preview mode on both containers, then the Test events tab in Events Manager. A good purchase shows as received from browser and server, deduplicated, with match keys present.
Common pitfalls with GTM-based setups
| Pitfall | What happens | Fix |
|---|---|---|
| The purchase only fires in the browser | A blocked or skipped thank-you page means no GA4 event, so no server event either | Add a backend source for purchases |
| Different event ids on pixel and server | Meta counts purchases twice, or cannot deduplicate | One id, created once, used by both tags |
| Missing or badly hashed contact data | Low Event Match Quality, weak optimization | Pass email and phone from the order, normalized |
| Server IP and user agent sent instead of the shopper's | Matching gets worse, not better | Forward the client values the container received |
| A second CAPI sender for the same pixel | An app or the shop's Meta channel sends the same purchase | Keep one server sender per dataset |
| Consent ignored in the server container | Events go out for visitors who declined | Pass the consent state with each event and respect it in the tags |
Why GTM alone is not ideal for a webshop
A server container makes delivery more reliable, but the source of the purchase is still the browser in most setups. The store, on the other hand, knows about every paid order, including the ones where the thank-you page never loaded, the shopper paid with a wallet in another window, or a script blocker stopped GTM entirely.
- Purchase starts as a browser event
- Misses orders where the browser event never fires
- You host, update and monitor the containers
- Full control over every field
- Purchase starts from the paid order
- Every paid order is a candidate to send
- Click ids still need a first-party script during the visit
- Works next to GTM rather than instead of it
The backend route still needs the browser for one thing: the identifiers from the visit (fbclid, _fbp, a visitor id). A first-party script saves them during the visit and attaches them to the cart, so they arrive with the order. The server-side tracking explainer walks through that data path.
The backend route in ROASaurus
ROASaurus sends Purchase to the Meta Conversions API from your store's order data, with the click ids and visitor id saved during the visit and hashed customer details from the order. Browser and server copies share the event id order- plus the order id. If you already run a server container, ROASaurus can also forward order events to it as a Server-side GTM destination (GA4 Measurement Protocol format), so your own tags receive purchases the browser missed. It forwards only events with confirmed marketing consent, because the container's tags can send data anywhere. If you keep GTM for Meta as well, turn off one of the two Meta senders.

After the switch, Data quality › Overview shows per destination how many purchases were expected and how many the platform accepted, and Data quality › Deliveries shows every event with its status and the platform's response.
Next step
Sources
- Google Tag Manager: An introduction to server-side tagging
- Google Tag Manager: Send data to server-side Tag Manager
- Meta for Developers: Handling Duplicate Pixel and Conversions API Events
- Meta: Conversions API tag for server-side Google Tag Manager (GitHub)