Case study · Ecommerce

First-party server-side tagging on Google Cloud for a European ecommerce brand

A server-side Google Tag Manager environment on Google Cloud Run in the EU, routing GA4 and ad platform tags through the brand's own first-party server.

Case study cover: First-party server-side tagging on Google Cloud for a European ecommerce brand
Client
European ecommerce brand
Market
Europe
Business model
Online store
Platform
Google Cloud
Period
2024
Scope
Server-side GTM deployment on Google Cloud Run in EU regions, tag routing, server preview testing

Evidence: the work and the verified results below are shown in my own project screenshots. They are kept private because they contain client account details.

01The business problem

Ad blockers, Safari's limits on cookies set by JavaScript and short cookie lifetimes were reducing how many conversions GA4, Google Ads and Meta received.

The brand wanted tracking to run through its own first-party server, with data processed in the EU and hosting costs kept predictable.

02Why it was technically difficult

A server container is only useful if it stays fast and available. Undersized, it drops requests at busy times; oversized, it costs more than it needs to.

Moving tags to the server also changes how they are tested: a tag can look fine in the browser while the server request fails, so testing has to cover both sides.

03My approach

I deployed the container on Google Cloud Run in EU regions, routed the GA4 and advertising tags through it, and then tuned the instance settings by watching real CPU and memory use rather than guessing.

04How it fits together

  1. Website
  2. Web GTM
  3. First-party server (Cloud Run, EU)
  1. Server-side GTM
  2. GA4
  3. Ad platforms
First-party server-side tagging (generic labels)

05What I implemented

  • Server-side GTM on Cloud RunA server-side Google Tag Manager environment deployed on Google Cloud Run in EU regions, in two deployments.
  • Tag routingGA4 and advertising platform tags routed through the first-party server container.
  • Capacity tuningInstance settings adjusted so the service runs with low CPU use (under 4%) and memory around 25%, leaving room for traffic peaks.

06Testing and validation

Tested the setup in server-side preview mode before going live.

Watched the Cloud Run service metrics (CPU and memory) after launch.

07Outcome

Delivered

  • Server-side tagging live on Google Cloud Run in the EU
  • GA4 and ad platform tags routed through the first-party server

Verified

  • Cloud Run metrics show the service running with CPU under 4% and memory around 25%.

Not known / not published

  • Changes in conversion counts after the move are client data and are not published.

08Technical stack

  • Google Tag Manager
  • Server-side GTM
  • Google Cloud Run
  • Google Analytics 4

09Related services

10Go deeper

Jobair Mahmud
Jobair Mahmud

AI-driven Performance Marketing & Web Analytics Consultant · About me

Cross-domain GA4 and consent-aware conversion tracking for a European fintech company
Fintech Europe

Cross-domain GA4 and consent-aware conversion tracking for a European fintech company

One measurement setup across a Webflow marketing site and separate application subdomains, with form events, Google Ads and Reddit conversions, and Consent Mode tied to the consent platform.

Client
European fintech and crypto analytics company
Platform
Webflow, Stripe
  • GA4
  • GTM
  • Cross-Domain
  • Consent Mode
  • Google Ads
Meta Pixel and Conversions API with clean deduplication for ecommerce stores
Ecommerce United States, Netherlands and Belgium

Meta Pixel and Conversions API with clean deduplication for ecommerce stores

Removed an old app integration that sent duplicate events, then rebuilt Meta tracking from browser and server with matching event IDs so each purchase counts once.

Client
Shopify and WooCommerce stores
Platform
Shopify, WooCommerce
  • Meta CAPI
  • Server-Side Tracking
  • GTM
  • Ecommerce Tracking

See all case studies or book a tracking consultation.

Let's Talk

Dealing with a similar problem?

Tell me what you're seeing in your reports. I'll reply with what I'd check first and whether I can help.

or reach me directly