Use Google tag gateway with Cookie Information

Google tag gateway for advertisers lets you load Google tags through your own domain instead of directly from a Google domain. It can also send some data collected by Google tags through your domain before it reaches Google.

Google tag gateway is a Google setup. Cookie Information doesn’t turn it on for you. If your website uses it, this article explains how it can affect consent management, what to check in a content delivery network (CDN) setup, and how to verify that everything works as expected.

Before you start

Here are a few things to know before you start:

  • Google tag gateway doesn’t replace consent management. Cookie Information still collects your visitors’ consent choices, and your Google tags need to respect those choices.
  • If you use Google consent mode, make sure the default consent states are set before Google tags run. These states tell Google tags how to behave before a visitor makes a consent choice.
  • Google tag gateway can be set up through a CDN, load balancer, or web server. Some automated CDN setups can affect where and when Google tags are added to your website.
  • If you use Google consent mode with Google’s automated Cloudflare setup, Google requires you to turn off automated script setup. You should also turn it off if you want to control where your Google code is placed.
  • After you turn on Google tag gateway, review your privacy notice and cookie descriptions. Make sure they still describe your Google setup and where data is sent.

Note: Google tag gateway changes how Google tags load and can send some data through your domain before it reaches Google. It doesn’t change the consent choices collected by Cookie Information.

What Google tag gateway does

In a standard setup, your website loads Google tags from a Google domain.

Google tag gateway lets you load a Google tag or Google Tag Manager (GTM) container through your own domain instead of directly from a Google domain.

It also sends some measurement events through your domain before they are forwarded to Google.

Note: Measurement events are data sent by Google tags when something happens on your website, such as a page view or conversion.

Google tag gateway can use infrastructure connected to your domain, such as a CDN, load balancer, or web server.

How Google tag gateway can affect consent management

Google tag gateway changes how Google tags are loaded and routed. It doesn’t replace Cookie Information or another consent management platform.

You still need to collect the visitor’s consent where required and make sure Google tags respond to that choice correctly.

How tags behave before a visitor makes a choice depends on the mode you use:

  • Basic Google consent mode v2: Google tags don’t collect data until the visitor gives consent.
  • Advanced Google consent mode v2: Google tags can load before the consent popup appears. If consent isn’t given, Google can collect cookieless data without personal identifiers.

Make sure Google tags get the correct consent information and respond to the visitor’s choice.

If you use an automated CDN setup

Some Google tag gateway integrations can add scripts automatically through a CDN, which may affect tag placement and loading time. Compared with manual setup, this can give you less control over your implementation.

For example, if you use Google consent mode with the Cloudflare integration, turn off automatic script setup. You can also disable this feature if you prefer to manage your code and tag placement manually.

If you use automated CDN setup, check that:

  • Cookie Information sets the default consent state before Google tags start processing data that depends on consent.
  • Your CDN setup follows the tag-loading rules you intended.
  • Google tags respond correctly when a visitor accepts or rejects consent.

Test your consent setup

After Google tag gateway is set up, test your website with different consent choices.

1. Open your website and don’t make a consent choice.

2. Check how your Google tags behave.

3. Reject consent and check the tags again.

4. Accept consent and check the tags again.

5. If visitors can change their consent choice, change it and check that the tags respond correctly.

Also check that:

  • The expected default consent state is set.
  • Google consent mode v2 updates the consent state after a visitor makes a choice.
  • Google tags respond to the updated consent state.
  • Your automated CDN setup doesn’t interfere with your Cookie Information setup.

Note: If you use Google Tag Manager, we recommend Preview mode to check the default and updated consent states.

Read more:

Review your privacy notice

If your website uses Google tag gateway, review your privacy notice and cookie descriptions.

Make sure they still accurately describe how you use Google services and collect data.

Check your setup

After you set up Google tag gateway, check that:

  • The default consent state is set before Google tags use data that depends on consent.
  • Google consent mode v2 updates the consent state after a visitor makes a choice.
  • Google tags respond correctly before consent, after rejection, and after acceptance.
  • Your automated CDN setup doesn’t bypass your Cookie Information setup or tag-loading rules.
  • Google Tag Assistant shows the measurement path you set for Google tag gateway.
  • Your privacy notice and cookie descriptions still match your setup.

Check that Google tag gateway is working

You can use Google Tag Assistant to check whether your website sends Google tag data through Google tag gateway.

To check the setup, follow these steps:

1. Install the Tag Assistant extension.

2. Open Google Tag Assistant.

3. Enter your website URL and connect Tag Assistant to your site.

4. Browse your website to trigger the relevant Google tags.

5. Go to Summary > Output > Hits Sent. Check that the hits are sent through the measurement path you set for Google tag gateway.

For example, if your measurement path is /metrics, you should see /metrics in the destination.

Note: In Google Tag Assistant, a hit is a request sent by a Google tag. The measurement path is the path on your domain that Google tag gateway uses to route those requests, for example /metrics.

6. Done.

Note: You can also check your Google tag gateway settings in your Google tag or Google Tag Manager to see the current status for your domain.

Troubleshooting

If Google tag gateway doesn’t work as expected with your consent setup, use the tips below to check common issues.

Google tags run before the default consent state is set

Check whether you set up Google tag gateway using automated CDN script setup.

If so, check whether this changed when or where Google scripts are added.

If you use Google’s automated Cloudflare setup with Google consent mode, turn off automated script setup as described in Google’s documentation.

Also make sure the default consent state is set before Google tags start processing data that depends on consent.

Consent signals are missing or delayed

Check your Google consent mode v2 setup. Make sure that:

  • A default consent state is set before Google tags run.
  • The consent state updates after a visitor makes a choice.
  • The update happens on the same page where the visitor makes the choice.
  • Google Tag Manager or the relevant Google tags can read the updated state.

If you use Google Tag Manager, Preview mode can help you check the default and updated consent states.

Hits don’t use the Google tag gateway measurement path

Check your Google tag gateway setup in your Google tag or Google Tag Manager.

Then reconnect Tag Assistant, trigger the tags again, and go to Summary > Output > Hits Sent.

Check that the hits use the measurement path you set for Google tag gateway.

Tags don’t respond to consent changes as expected

Test your website after accepting and rejecting consent. Then check:

  • Your Cookie Information setup and consent rules.
  • Your Google consent mode v2 setup.
  • The consent settings and blocking rules for the affected Google tags.
  • Whether your automated CDN setup changes when tags load or bypasses your Cookie Information setup.

Cookie Information updates the consent status used by Google Tag Manager. Google Tag Manager then uses that information to decide how tags should behave based on the visitor’s consent choice.

Fix late consent issues

Google tag gateway can sometimes load Google tags before Cookie Information sets the visitor’s default consent state. Google may report this as a late consent signal.

If this happens, choose one of the following approaches. We recommend using the first one.

Option 1. Use advanced Google consent mode v2 with data transmission controls and Global Consent Defaults.

With advanced consent mode v2, Google tags can load before the visitor makes a choice. Data transmission controls add rules about what information can be sent, while Google’s Global Consent Defaults set Google’s consent settings before the visitor makes a consent choice.

Option 2. Put all Google tags in Google Tag Manager and manage consent there.

If your Google tags are added in several places on your website, you can move them into one Google Tag Manager container. Then use Google tag gateway to load your Google Tag Manager container on the website.

Option 3. Set up Google tag gateway manually so you control what loads first

You can set up Google tag gateway manually instead of using an automatic CDN integration. This way you control the order in which scripts load. This lets Cookie Information set the default consent state before Google tags load.

For more information, see Google’s official documentation:

Related articles


Was this article helpful?