Server Side Tracking

Implementing Server-Side GTM on Google Cloud Run

Server-Side GTM on Google Cloud Run

Server-side GTM Cloud Run case study

๐Ÿ“ŒIntroduction

A high-traffic media publisher needed to future-proof their tracking infrastructure against increasing browser privacy restrictions and ad blockers, which were blocking their client-side GTM tags on up to 35% of sessions.

โ—The Problem

Client-side GTM was being blocked by Safari ITP, Firefox ETP, and popular ad-blocking browser extensions. This meant 35% of sessions had no analytics data and key conversion events were being missed entirely. Data quality was deteriorating year over year.

๐Ÿ”Identifying the Causes

All tracking relied on first-party JavaScript loaded via third-party domains (google-analytics.com, googletagmanager.com). These domains are on blocklists used by most major ad blockers and are restricted by browser privacy features. There was no fallback mechanism.

โš ๏ธConsequences for the Business

30-35% of conversion data was simply missing. Ad platforms were under-reporting conversions and smart bidding was not performing optimally. The publisher's advertiser reporting showed lower impression-to-conversion rates than were actually occurring.

โœ…Solution

Deployed server-side GTM on Google Cloud Run using a custom first-party subdomain (stm.publisherdomain.com). All tracking requests were routed through this first-party endpoint, making them indistinguishable from the site's own traffic. Migrated all critical tracking tags to the server container.

๐Ÿ“ˆResults

Tracked sessions increased by 31% as previously blocked tracking was recovered. Conversion event reporting improved by 28%. Page load speed improved by 340ms as heavy client-side scripts were removed. Ad platform ROAS reporting became more accurate.

๐ŸConclusion

Server-side GTM on a first-party subdomain is the most durable tracking architecture for the modern privacy era. The performance and data quality benefits compound over time as browser restrictions increase.

๐Ÿ’กKey Takeaways

Use a subdomain of your own domain (e.g., stm.yourdomain.com) for the server container to maximize first-party cookie lifetimes. Cloud Run is cost-effective for most traffic volumes. Migrate the most critical events first and validate before migrating all tags.

Talk to with Us, It's Free

We are always willing to help a client in need and answer any questions or provide guidance. Let us know what you are looking for, and we will develop a unique and bespoke solution for you.

โš ๏ธ reCAPTCHA site key is not configured

BUSINESS HOURS

Not Available

ADDRESS

No Address

TOLL FREE

No Phone