Short answer: with server-side GTM, your website's measurement data goes first to a server you control, on your own subdomain, and only then on to GA4, Meta, Google Ads and other platforms. This reduces event loss, gives you control over which data leaves the site, improves cookie lifetime and makes the page lighter. The cost is server hosting and a more technical setup.
In this article
- How traditional, browser-based measurement works
- What changes with a server container
- The real benefits and the exaggerated promises
- How much it costs and where to host it
- Step-by-step setup
- Common mistakes and how to verify
- Frequently asked questions
Traditional measurement, in the browser
In the traditional model, Google Tag Manager loads in the visitor's browser and from there fires several tags: GA4, the Meta pixel, the Google Ads tag, sometimes TikTok and LinkedIn. Each one loads its own code and sends data straight to its platform.
This model has three problems. First, every extra script weighs on the page and slows it down. Second, blockers and privacy-focused browsers stop part of these requests. Third, you do not control what each script collects: it takes whatever it wants from the browser.
What changes with server-side
With server-side tagging, there are two containers:
- The web container, which still runs in the browser, but sends events to an address of yours, such as
data.yourcompany.com, instead of sending them to each platform. - The server container, which runs in the cloud, receives those events, processes the data and forwards it to GA4, Meta, Google Ads and other tools.
For the browser, there is a single conversation, with the company's own domain. The platforms receive data from the server, which you control.
The real benefits
| Benefit | What happens in practice |
|---|---|
| Fewer lost events | Requests to your own subdomain are blocked less often than third-party scripts |
| Longer-lasting cookies | Cookies set by the server on your domain tend to last longer than those created by JavaScript in privacy-focused browsers, which improves attribution for people who come back days later |
| Data control | You decide what goes to each platform and can strip information before sending |
| Lighter website | Fewer third-party scripts running in the visitor's browser |
| Conversions API and enhanced conversions | The same server feeds Meta and Google Ads with more complete data |
What server-side does not do
- It does not remove the need for consent. Privacy rules still apply, and the server must respect the visitor's choice.
- It does not recover 100% of events. If the web container is blocked in the browser, the event is never created. The improvement is large, not total.
- It does not fix poorly planned tracking. Wrongly named events and duplicated conversions are still wrong on the server.
How much it costs and where to host it
The server container needs hosting. The most common options are:
- Google Cloud (Cloud Run): the option documented by Google itself. Cost depends on traffic volume and instance configuration.
- Services specialized in hosting server-side GTM: they charge by request tiers and simplify maintenance, with affordable entry plans for small and mid-sized sites.
- Your own server: possible, but it requires more care with updates and uptime.
For most small and mid-sized businesses, the monthly hosting cost is low compared with the ad budget. The right question is: how much of your budget is being optimized with incomplete data today?
Step-by-step setup
- Map the events that matter. Usually: page view, lead (form submission), WhatsApp click and purchase. Define names and parameters before opening GTM.
- Create the server container in Google Tag Manager and provision the hosting.
- Set up your own subdomain, such as
data.yourdomain.com, pointing to the server. This step is what ensures the first-party context. - Adjust the web container to send GA4 events to your server, through the Google tag configured with the server URL.
- Create the clients and tags on the server: the GA4 client receives the data, and the tags forward it to GA4, Meta (Conversions API), Google Ads and other platforms.
- Include user data in conversion events, such as email and phone, for Meta and for Google's enhanced conversions. Hashing happens before sending to the platforms.
- Set up deduplication between the pixel and the Conversions API with the same
event_id. See the details in the article on the Meta Conversions API. - Test with preview mode on both containers and with Meta's and Google's testing tools.
- Publish and monitor for a few days, comparing the numbers with the CRM.
GA4: what to configure alongside
- Key events: mark as key events only real conversions, such as leads and purchases. A button click is not a conversion.
- Data retention: by default, GA4 keeps detailed data for two months. Increase it to the maximum available in the settings.
- Internal traffic exclusion and referral exclusions, so your own team and payment gateways do not distort the numbers.
- Links to Google Ads and Search Console, to cross campaigns, search and behavior.
Common mistakes
- Running the server on the hosting provider's default domain, without your own subdomain. You lose much of the cookie benefit.
- Leaving the old tags in the browser alongside the server ones, without deduplication. The result is doubled conversions.
- Conversion on the thank-you page. It is more reliable to fire on successful form submission.
- No monitoring. The server can go down or hit its plan limit without anyone noticing.
- Too many custom events. The more invented events, the harder the setup is to maintain. Use Google's recommended events whenever possible.
Example lead flow
To picture the full path, follow what happens when someone submits a form on a website with a well-configured server-side setup:
- The person arrives from the ad with the click identifier in the URL. The site stores it in a first-party cookie.
- They fill out the form. On successful submission, the site generates a unique event identifier and sends the lead event to the web container.
- The web container sends the event to your data subdomain, along with email and phone.
- The server container receives it, records it in GA4 as a key event, sends it to Meta through the Conversions API and to Google Ads as an enhanced conversion, with personal data hashed.
- At the same time, the pixel in the browser sends the same event with the same identifier, and Meta counts it only once.
- The lead enters the CRM with the source filled in. Days later, when it becomes a sale, the CRM sends the purchase event, closing the loop.
Maintenance after launch
Tracking is not install and forget. Websites change, forms get replaced, platforms update their requirements. A minimum maintenance routine includes:
- A monthly test of form submission and WhatsApp click, checking that events reach GA4, Meta and Google Ads.
- A monthly comparison between leads recorded on the platforms and leads in the CRM.
- Downtime alerts for the server and monitoring of hosting plan usage.
- A tag review whenever the website gets a new page or form.
When it pays off
It pays off when you invest in ads every month, use more than one platform and depend on conversion data to optimize campaigns. For an informational website without ads, the gain is small and the traditional setup is usually enough.
How EMB-S sets it up
In EMB-S tracking projects, server-side tagging is built together with the business's event map, the Meta Conversions API, Google Ads enhanced conversions and the CRM integration. We use few events, with standardized names, and fire the conversion on form submission, not on a thank-you page. Before publishing, we test every visitor path and afterwards compare the platforms with the CRM to make sure the numbers match. The result is a reliable data foundation for campaigns to learn from and for you to decide your budget.
Frequently asked questions
Do I need to change my website to use server-side?
No. Server-side works with any website where you can install Google Tag Manager and create a subdomain in DNS.
Will my GA4 numbers change?
Usually more events and conversions show up, because less data is lost. So compare periods carefully right after the change.
Can I set up only the Conversions API without full server-side?
Yes, with native integrations or Meta's gateway. Server-side pays off when you want to handle several platforms at once, with a single point of control.
Summary
- With server-side, the website sends data to your own server, which forwards it to the platforms.
- Gains: fewer lost events, longer-lasting cookies, data control and a lighter site.
- Use your own subdomain and set up deduplication with the Conversions API.
- Consent and well-defined events are still required.
- It pays off for businesses that invest every month across more than one ad platform.