The short answer
A GTM server-side container setup has five parts: create a Server container in Tag Manager, host it (Cloud Run or a host like Stape), point a subdomain of your site at it, send your web hits to that URL, then add tags for each ad platform. Plan for the hosting bill and the upkeep, not just the setup day.
DataCops is a tool that does the ad-conversion job without a container, warehouse or plugin: one script and one DNS record on your own domain, a bot verdict on every visit with a Real people only switch per ad platform, the real sale from your CRM or Shopify sent back to your ads, new campaigns warmed up with the customers you already have, and a log of every send.
How DataCops does it:
- First-party collection, no extra tool. One script and one DNS record put collection on your own subdomain; with your DNS on Cloudflare, the free Worker reads the click at the edge before the page loads. Click IDs are kept on the server for up to 90 days.
- Real people only. Every visit gets a bot verdict against 360+ billion IPs and 350+ monitoring points, with a Real people only switch per ad platform, off by default. Every form email is checked for disposable providers, domains with no mail server and an email risk score.
- The sale after the form. HighLevel natively (lead, booked, showed, won with value, paid), any CRM by webhook, Shopify through the DataCops Shopify app, all matched to the click by click ID or hashed email and phone, and sent to Meta, Google Ads, TikTok and LinkedIn.
- Ads Warmup. Upload your existing customers (up to 20,000 rows), see a 0 to 10 match score per person, and send them to Meta, Google Ads and TikTok so new campaigns start warm.
- Consent, memory and proof. A TCF 2.2 consent banner from your domain with Google Consent Mode v2 on by default, a server-set cookie up to 400 days where enabled, and a delivery log row for every send, counted once against the pixel.
Best for: teams who want better ad conversions without building or maintaining the pipe: lead gen, ecommerce, clinics, home services, B2B and agencies.
- Checked September 2026.
- What you gain: first-party requests, longer-lived cookies, control over what leaves.
- What you do not gain: bot filtering, or the sale that happens after the form.
The container that worked perfectly
Picture this. A lead gen agency moves a client to server-side GTM. The preview shows green ticks. Meta Events Manager shows the Lead event arriving from the server, match quality up. Everyone goes home happy.
Three weeks later the client calls. More leads than ever. Fewer booked appointments than ever.
Nothing was broken. The container did exactly its job: it took every form submit and delivered it, cleanly, to Meta. Including the ones typed by scripts. Meta learned from them and found more.
Server-side is a better pipe. It is not a filter.
Keep that in mind. First, get the container running right.
The real cost of a cheap tool
Cheap tracking that is handled badly costs far more, because the bill arrives in what your ads learn.
- Bots forwarded as buyers. A forwarder sends what reaches it. Junk conversions teach the platform to find more junk.
- The sale that never gets sent. A booked call, a phone order or a won deal happens outside the store or the page. Most tools never see it.
- The limit you hit on your busiest day. Hosts and apps cap requests, events or orders, and sending can pause or stop over the limit.
- The build and the upkeep. Containers, plugins and automations need someone to build them and fix them when a platform changes.
The tracking is 0.17 percent of your spend. If one in five of the conversions your ads learn from is a bot or a fake lead, a fifth of the learning signal points at the wrong people, across the other 99.83 percent of the budget.
Cheap tracking is the cheapest line on the bill and the most expensive one to get wrong.
Ways to run server-side tracking
| Tool | Best for |
|---|---|
| DataCops | Ad-funded teams who want clean conversions from one script |
| Stape | Cheap hosted server GTM, if someone owns the container |
| TAGGRS | Hosted server GTM with EU hosting |
| Server-side GTM, self-hosted | Engineering teams who want full control |
| The platform's own pixel or tag | Basic browser tracking on one platform |
Build it or skip it?
| If this sounds like you | Go with |
|---|---|
| You have a GTM specialist and many destinations | Server-side GTM |
| You want your data inside your own Google Cloud | Server-side GTM on Cloud Run |
| Your ads are Meta, Google Ads, TikTok or LinkedIn, and leads are the goal | DataCops |
| No one on the team wants to own a container | DataCops |
Server-side GTM wins on flexibility. It is free to open, reaches any destination, and has a huge community. DataCops only sends to Meta, Google Ads, TikTok, LinkedIn, Microsoft Ads, Reddit, Pinterest and X. If you need a dozen other destinations, keep the container. For a side-by-side, read server-side GTM vs DataCops or our GTM alternative page.
Best for server-side GTM: teams with a specialist and many destinations. Best for DataCops: lead gen, clinics, HighLevel agencies and teams without a GTM specialist.
When not to use DataCops
- You need custom tag logic or non-ad destinations. DataCops sends to ad platforms and is not a Google Tag Manager container. A hosted server container gives full control, if someone owns it.
- You want a reporting dashboard. DataCops fixes what goes into your ads. It does not replace the reports you already read.
Ads Warmup: tell the ads who pays
Server-side GTM container forwards what your site or store produces. A new ad account, pixel or campaign has nothing yet, so it pays to learn from scratch. That is a job a pipe cannot do, because the customers you already have never visit on command.
Ads Warmup, DataCops' flagship feature, sends them to your ad platforms before a campaign spends:
- Upload a customer list. A CSV of past buyers, old leads or booked calls. DataCops reads your columns; only email is required.
- See a match score for every person. An estimate from 0 to 10 from email, phone, name, location, click ID and customer ID, before anything is sent.
- Pick the event. Purchase, Lead, Complete registration, Add to cart or Schedule.
- Send server-side. Up to 20,000 people per upload to Meta, Google Ads and TikTok, with a sent, skipped or failed result per person. Google Ads credits only people who clicked a Google ad.
Each row is dated when you press send, not with the old sale date, so it gives a new campaign real customers to learn from on day one. Preview is free; sending needs a paid plan.
What else a pipe never does
- Capture at the edge. With DNS on Cloudflare, the free, optional DataCops Cloudflare Worker reads click IDs and UTMs off the first request, before the page or any script runs. It captures; it does not block.
- Keep the click on the server. gclid, wbraid, gbraid, fbclid, ttclid and li_fat_id are stored for up to 90 days, so a deal that closes weeks later still finds its click. A signed server-set cookie lasts up to 400 days where enabled.
- Check the lead's email. Fixed rules, not guesses: disposable providers, domains with no mail server and an email risk score. With LeadCops (Business and up), a lead that fails is held and never billed.
- Install on Shopify. The DataCops Shopify app adds a web pixel and a theme app embed, so every paid order reaches your ads, express checkouts included. See Shopify Conversions API.
- Hand evidence to Google. On the Organization plan, the fraud refund report exports bot-flagged Google Ads clicks in the format Google's Click Quality form asks for. You attach it; Google decides.
What does a GTM server container actually do?
It moves the sending of tags from the browser to a server on your own domain. The browser sends one hit to your server, and the server fans it out to GA4, Meta, Google Ads and the rest.
Web container only
Each vendor script loads in the browser and calls its own domain. Blockers see facebook.com and google-analytics.com and stop them. Safari caps cookies set by script.
With a server container
One hit goes to sgtm.yourdomain.com. Your server sets cookies in its response and decides which data each vendor gets. You can strip fields before they leave.
Note the word "one hit". The browser is still in the chain. If the page never sends it, the server never sees it.
Where should the server run?
Pick hosting before you touch Tag Manager, because it decides how much of the setup you do by hand.
| Option | What you manage |
|---|---|
| Google Cloud Run | Billing account, scaling, custom domain, the preview server |
| Stape | Custom domain, tags. Hosting is theirs |
| Your own server (Docker) | Everything |
Google says two to ten autoscaled servers handle roughly 35 to 350 requests a second. Most small sites never get near that. Stape is cheaper to start. Cloud Run keeps everything in your own Google account. Both are fine. See our Stape comparison if you are weighing a host.
How to set up a GTM server-side container, step by step
- Create the container. In Tag Manager, open Admin, click the plus to create a container, and choose Server as the target platform.
- Provision the tagging server. Choose automatic provisioning to spin it up on Google Cloud, or copy the Container Config string and paste it into Stape or your own Docker deploy. Keep that string private.
- Map a custom domain. Add a subdomain such as sgtm.yourdomain.com with the DNS record your host gives you. Same parent domain as your site, or you lose the first-party benefit.
- Save the server URL in GTM. Go to Admin > Container Settings and enter it as the Tagging server URL. Preview will not work without it.
- Send web hits to the server. In your web container, on the Google tag for GA4, add the parameter
server_container_urlwith your subdomain as the value. Publish. - Check the GA4 client. In the server container, under Clients, the GA4 client is there by default. It claims the incoming hits and turns them into event data.
- Add platform tags. A GA4 tag to forward analytics, then a tag per ad platform: Meta Conversions API, Google Ads conversion, TikTok, LinkedIn. Most come from the Community Template Gallery.
- Pass an event_id. If the Meta pixel still runs in the browser, send the same event_id from both sides so Meta counts the event once.
- Wire consent. Your CMP must set consent state in the web container, and your server tags must respect it. Test with consent denied, not just granted.
How do you know it works?
Open your server URL with /healthy on the end. Google’s guide says it should return ok. If it does not, the problem is hosting or DNS, not tags.
Then click Preview in the server container, browse your site in another tab, and watch requests arrive. Each should show which client claimed it and which tags fired. If requests arrive but no client claims them, your GA4 client is missing or the path is wrong.
Last, check the receiving side. Meta Events Manager should show the event as Server, and deduplicated if you also run the pixel. Google Ads should show conversions recorded under the right action.
What will a server container not do?
Two things, and they are the two that cost the most money.
It will not tell a bot from a person. A script that submits your form sends the same request a person does. The GA4 client claims it, the Meta tag forwards it, and Meta now has a lead to learn from. You can write filter rules in the container, but you have to know what to filter, and keep it updated every time the bots change.
It will not see the sale. The container knows about the form. It does not know that the lead booked, bought or never answered. To send that, you build a CRM webhook, store click IDs, match them back and handle the timing. Most setups stop at Lead, so the ads optimise for form fills.
Your ads learn from what you send them. Send them people, and send them the sale.
Then there is upkeep. Published estimates put a full server-side GTM build at 50 to 120 specialist hours, and every time a platform changes a field, someone opens the container again.
This is the gap DataCops was built for. DataCops is the tracking solution for ad-funded businesses: it keeps bots out of what your ads learn from and sends the sale that happens after the form to Meta, Google Ads, TikTok, LinkedIn, Microsoft Ads, Reddit, Pinterest and X.
It runs server-side too, without a container. You add a script and a DNS record, connect each platform in one click, and every visit gets a verdict. Pixel and server events are deduplicated by event_id and counted once. CRM sales are matched back by click ID or hashed email and phone, and a per-row delivery log shows each event as sent, held, skipped or failed, with the reason. The consent manager is first-party, IAB TCF v2.2, served from your own domain. For forms, LeadCops adds verification in two lines of code and can hold the ad conversion until your CRM confirms it. More on how it works on our server-side tracking page.
FAQ
Can I warm up a new campaign with my existing customers?
Yes, with DataCops Ads Warmup. Upload a CSV of customers (only email is required, up to 20,000 rows), see a 0 to 10 match score for each person, and send them to Meta, Google Ads and TikTok, dated when you send. Google Ads credits only people who clicked a Google ad.
What is a GTM server-side container?
It is a Tag Manager container that runs on a server you pay for instead of in the visitor’s browser. Your site sends events to it, and it forwards them to GA4, Meta, Google Ads and others from your own domain.
Do I still need the web container?
In most setups, yes. The browser still sends the first hit, usually through the GA4 tag pointed at your server URL. The server container receives and forwards it.
Does server-side GTM get past ad blockers?
It helps. A first-party subdomain like sgtm.yourdomain.com is not on the common block lists the way third-party pixel domains are. It is not a guarantee, because the browser still has to send the hit.
Why is my server container not receiving anything?
Check three things. The server_container_url on your GA4 tag, the Tagging server URL under Admin > Container Settings, and the GA4 client in the server container. Then open your server URL with /healthy on the end. It should say ok.
Does server-side GTM filter bots?
No. It forwards whatever arrives. A bot that fills your form looks like any other event, so it reaches Meta and Google Ads as a conversion unless you build the filter yourself.
Can I send CRM sales through server-side GTM?
You can, but you build it: a webhook from your CRM, a custom client, click ID storage and matching. Most setups stop at the form fill.