Introduction
Measurement strategy is going through a major shift. With tighter privacy rules, the gradual disappearance of third-party cookies, and the rise of script blockers, advertisers need to rethink how their data flows. In this context, Google is introducing a new technical option: Google Tag Gateway. This gateway lets you deploy Google tags from your own domain instead of directly from Google’s servers. The goal is simple: make data collection more resilient while aligning with current privacy expectations. Before adopting it, it helps to understand how it works, its strengths, its limits, and when it truly makes sense.
What is Google Tag Gateway
Since May 2025, Google Tag Gateway for advertisers offers a new way to deploy Google tags directly from your own domain instead of relying only on Google’s servers. In practice, this technology routes the Google tag through a website’s own infrastructure, whether through a CDN, a load balancer, or an existing web server. Instead of loading the tag from a Google domain and sending all measurement requests straight to Google, the site loads the tag from its own domain, for example mysite.com/metrics. Measurement requests go through that domain first, then are sent to Google. This setup gives advertisers a first-party deployment, which improves resilience against cookie and script blockers and leads to better measurement quality in a stricter privacy environment.
Server-side data collection has existed for years, but it usually requires a more complex setup, including a server-side Google Tag Manager container, dedicated hosting, often on Google Cloud App Engine or a similar service, and solid technical skills to manage data flows.
Google Tag Gateway positions itself as a simpler, more accessible option. Instead of rebuilding a full server-side setup, you can route requests through your own domain without setting up a full GTM server. In other words, it captures some of the gains of server-side setups, such as first-party loading and reduced blocking by browsers, with less technical effort and without relying on heavier deployments.
At the same time, enabling Google Tag Gateway often comes with an added gain through the use of a CDN, or Content Delivery Network. A CDN can be thought of as a network of copies of your site spread across servers around the world. Its role is to deliver content from the location closest to the visitor, which speeds up page load times. It also adds a layer of security by filtering attacks, absorbing traffic spikes, and protecting the origin server.
So when a company enables Google Tag Gateway through a service like Cloudflare, it not only gets more reliable first-party tracking, but also faster load times and stronger site protection, which improve user experience and overall stability.
Pros and cons
Pros:
- First-party data and privacy: Google tags are loaded from your own domain, such as mysite.com/metrics, instead of a Google domain, so they appear as first-party interactions. This reduces the chance they are blocked by browsers and also improves privacy. Data passes through your domain first, making it more transparent and better aligned with current regulations like Law 25, GDPR, and ePrivacy.
- Better measurement: less data loss due to third-party cookie restrictions, which means more conversions and events are correctly attributed.
- Relative simplicity: compared to a full server-side GTM setup, it is easier to deploy since you do not need to host a full server container or maintain a complex setup.
- Works with existing infrastructure: can be set up on a CDN, load balancer, or existing web server.
- Lower cost: no need for paid services like App Engine or a dedicated server. You can use Cloudflare for free or rely on existing infrastructure.
- Extra gains from the CDN: enabling Google Tag Gateway through Cloudflare also improves load speed and strengthens protection against attacks.
Cons :
- Limited to Google products: it only proxies Google tags such as Google Ads and GA4. Other tags like Meta, TikTok, and LinkedIn still load as third-party and remain vulnerable to blockers.
- Less flexible than server-side GTM: unlike a server-side container, you cannot modify, filter, or enrich data before sending it. It acts as a simple proxy, not a transformation tool.
- Technical setup required: even if simpler than server-side, it still requires technical access, such as CDN settings, proxy rules, and headers. It is not always possible on basic shared hosting.
- Not a magic fix: it improves the resilience of Google tags but does not solve every issue tied to the loss of third-party cookies or privacy compliance like consent.
- DNS and proxy risks: if set up incorrectly, for example by proxying MX records, you can break email or other services.
How to set it up
Simplest option: via Cloudflare
Google offers direct integration with Cloudflare, one of the most widely used CDNs. If your site already uses Cloudflare or you choose to enable it:
- Setup can be done in a few clicks from your GA4 account, Google Tag Manager, or directly in Cloudflare.
- Google automatically configures the proxy that routes traffic through your domain, for example yoursite.com/metrics.
- No need to modify server code or manage headers or routing rules. Cloudflare handles it.
This is the easiest and fastest option for most advertisers.
Advanced option: manual setup
If you do not use Cloudflare or want full control, you can set up Google Tag Gateway manually. This requires more technical work but is possible with most setups such as a web server, CDN, or load balancer.
- Create a routing rule to reserve a path like yoursite.com/metrics/*.
- This path sends requests to Google Tag Gateway, for example G-XXXXXX.fps.goog.
- Adjust certain technical headers so geolocation data and cookies are properly forwarded.
- Test the setup by opening yoursite.com/metrics/healthy. If everything is working, the page displays “ok”.
This option offers more flexibility but is more complex and usually requires access to hosting or CDN settings and ideally a technical specialist.
For more details on manual setup, refer to Google’s documentation.
What are the basic requirements to install GTG?
1. An active website
- GTG only applies if you have a website where Google tags like GA4, Google Ads, or Tag Manager are already in use.
- If you do not have a site or rely only on third-party landing pages, GTG will not add value.
2. Access to network infrastructure
- You need a CDN such as Cloudflare, Fastly, Akamai, or AWS CloudFront, or a configurable load balancer or web server such as Apache, Nginx, LiteSpeed, or GCP Load Balancer.
- You do not need both, one is enough.
- On basic shared hosting, it is often difficult to implement without an external CDN.
3. Ability to modify routing rules
- You need to reserve a path, often /metrics, that routes Google requests through your domain before sending them to Google.
- This requires access to network settings, either directly or through your CDN dashboard.
4. Google tags already in place
- GTG only applies to Google tags like GA4, Google Ads, or Floodlight.
- Other tags such as Meta, TikTok, and LinkedIn remain third-party and do not gain the same resilience.
Who is GTG really for?
Advertisers heavily reliant on Google Ads or GA4
- For those whose conversions, sales, or leads depend largely on Google advertising, GTG improves tracking accuracy and reduces data loss from blockers.
Companies focused on privacy and first-party data
- Brands that want better control over data collection and to reassure users about privacy will find GTG a concrete way to shift Google tags to first-party.
Small and large businesses with limited technical resources
- Unlike server-side GTM, which requires a strong technical team and often extra hosting costs, GTG is simpler and more accessible.
- It is a good option for companies that want first-party tracking without the complexity of a full server-side migration.
Companies already using a CDN
- For organizations already using Cloudflare, Akamai, Fastly, or similar services, enabling GTG is quick and low cost.
Technical level required
- Infrastructure access
- For Cloudflare: you need to know how to change domain nameservers and understand the difference between proxied and DNS-only records.
- For manual setup: you need access to a configurable server or CDN and the ability to modify proxy rules and HTTP headers.
- Basic knowledge of networking and DNS
- Understand how domains, subdomains, A and CNAME records work, and how they affect websites and email.
- It is not highly complex, but it goes beyond simple WordPress or Shopify management.
- Testing and validation
You should be comfortable testing endpoints such as /metrics/healthy, reading HTTP headers, and checking that data is correctly sent to Google.
Conclusion
Google Tag Gateway reflects a broader shift in measurement, moving from a fully third-party model toward one centered on the site’s own domain. While it does not replace a full server-side setup, it offers a simpler way to strengthen the reliability of Google tags, especially as browsers and regulations become stricter.
For advertisers that rely heavily on Google Ads and GA4, and for companies already using a CDN, GTG is a logical upgrade to an existing measurement plan. It is not a universal fix or a cure-all for data-related constraints, but rather a useful technical adjustment when the right conditions are in place.
At Hamak, Google Tag Gateway is seen as a natural extension of a well-designed tracking setup. When added at the right time, such as during a new engagement, a migration, or a compliance project, it helps build a more reliable measurement foundation without adding unnecessary complexity. Contact us to integrate solutions like Google Tag Gateway into your measurement plan.