Google Tag Manageradvanced 5 min read 4 steps

Server-Side GTM: Overview and Setup Guide

Server-side GTM moves tag processing from the user's browser to a server you control. This improves data accuracy (bypasses ad blockers and browser restrictions), reduces page load impact, and gives you more control over data before it reaches third-party platforms. Setup requires a Google Cloud pro

Advancedserver side gtm setup

Quick summary

Server-side GTM moves tag processing from the user's browser to a server you control. This improves data accuracy (bypasses ad blockers and browser restrictions), reduces page load impact, and gives you more control over data before it reaches third-party platforms. Setup requires a Google Cloud pro

Process Flow

Animated overview of the full workflow

Start
1How Server-Side GTM Works
2When to Consider Server-Side
3Setup Overview
4Cost Considerations
Complete

TL;DR

Server-side GTM moves tag processing from the user's browser to a server you control. This improves data accuracy (bypasses ad blockers and browser restrictions), reduces page load impact, and gives you more control over data before it reaches third-party platforms. Setup requires a Google Cloud project, a server-side GTM container, and a server (App Engine or Cloud Run) to host the container. It is more complex than standard GTM but increasingly important as browser-based tracking becomes less reliable.


Step-by-Step Guide

Follow these 4 steps to complete this guide

  1. 1

    How Server-Side GTM Works

    Standard GTM: user's browser sends data directly to Google, Meta, etc. Server-side GTM: user's browser sends data to your server, your server processes and forwards data to platforms. This gives you control over what data is sent, improves first-party data collection, and reduces the impact of ad blockers.

  2. 2

    When to Consider Server-Side

    When ad blockers significantly reduce your tracking accuracy. When you need to enhance data with server-side information (CRM data, user IDs). When page performance is critical and you want to reduce client-side JavaScript. When you need to comply with strict privacy regulations and want control over data flows.

  3. 3

    Setup Overview

    Create a server-side container in GTM. Deploy the container to Google Cloud (App Engine or Cloud Run). Configure your domain's first-party subdomain to point to the server. Update your web GTM container to send data to your server-side endpoint instead of directly to platforms. Create server-side tags that forward processed data to Google, Meta, etc.

  4. 4

    Cost Considerations

    Server-side GTM requires a cloud server, which has hosting costs. Google Cloud App Engine flexible environment costs vary by traffic volume. Budget approximately USD 50-200/month for moderate traffic sites.

Was this guide helpful?

Your feedback helps us improve our guides

GO