Google Tag Gateway is a Google mechanism that lets you load Google tools directly from your website's domain. In this article we describe how this solution works and what to watch out for when you use it together with CookieOfficer. You will find instructions for turning on Google Tag Gateway and verifying the setup in the article "Late default consent state and Google Tag Gateway".
What is Google Tag Gateway?
- By default, Google tools are loaded from a Google domain, and measurement data goes directly to Google.
- With Google Tag Gateway, Google tools are loaded from a path on the website's domain. Part of the measurement data is sent through this domain and then goes to Google.
- In Google's documentation the mechanism is called "Google tag gateway for advertisers".
You can set up Google Tag Gateway in three ways:
| Method | Description |
|---|---|
| CDN, automatic setup | Google connects to the CDN account, e.g. Cloudflare, and places the Google tools code in the website code on its own. In Cloudflare this is the "Automated" option. |
| CDN, setup following instructions | The website owner points Google tools to the new path themselves, following Google's instructions. In Cloudflare this is the "Guided" option. |
| Load balancer or web server | The path is set up on your own infrastructure. |
How does Google Tag Gateway affect how Google tools work?
| Changes | Stays the same |
|---|---|
| The domain Google tools are loaded from | The obligation to obtain user consent |
| How measurement data is passed to Google | How Google Consent Mode works |
| Passing data to Google | |
| The scope of data from users who did not give consent |
According to Google, the gateway processes only Google's own cookies. Other cookies passed through the gateway are dropped and not stored.
Google Tag Gateway does not anonymize data. It only changes the way Google tools and measurement data reach Google.
Is user consent still required with Google Tag Gateway?
Yes. Google tools rely on Google Consent Mode just as they did before Google Tag Gateway was set up. Only the URL they are loaded from changes. The rules on cookie consent stay the same.
Google Tag Gateway and CookieOfficer
CookieOfficer supports websites that use Google Tag Gateway. With this solution we recommend setting up Google Consent Mode in Advanced mode. Google tools are then loaded from the website's domain, so automatic cookie blocking does not stop them. The order in which scripts load also matters: the default consent state must be set before the Google tag runs. You will find setup details in the article "Late default consent state and Google Tag Gateway".
Google Tag Gateway and server-side tagging
| Google Tag Gateway | Server-side tagging | |
|---|---|---|
| Use | loading Google tools from the website's domain | passing measurement data through your own tagging server |
| Managed by | Google and the CDN | the website owner |
| Effort | small when set up through a CDN | larger, requires your own server |
Google recommends combining both solutions. In both cases you need to set up user consent correctly through Google Consent Mode.
Most common mistakes when setting up Google Tag Gateway
- Automatic script setup in Cloudflare with Google Consent Mode turned on. Google states that in this case it must be turned off.
- Assuming that Google Tag Gateway removes the obligation to obtain user consent.
Frequently asked questions
No. Google tools still read the consent state through Google Consent Mode. Only the domain they are loaded from changes.
No. Google fills in missing data only through modeling. We describe modeling in the article Google Consent Mode v2: Basic and Advanced mode.
No. CookieOfficer does not require Google Tag Gateway. With Google Tag Gateway turned on, however, you need to take care of the order in which scripts load.
Follow the article Late default consent state and Google Tag Gateway.
Google documentation
- Google tag gateway for advertisers
- Set up Google tag gateway for advertisers in the Google tag with Cloudflare
- Google tag gateway cookie handling
Related articles
Wojciech Bednarski
Creator of CookieOfficer. Years of experience implementing measurement and compliance in e-commerce and agencies.