Google Ad Manager and GPT Privacy Settings: Passing Consent to Your Ad Tags

Where Consent Meets the Ad Tag

Your CMP records what a user chose. Your ad tags still have to act on it. In Google Ad Manager, the Google Publisher Tag (GPT) is the library that requests and renders ads, and it exposes a few settings that change how an ad request is treated. Knowing which setting does what saves you from the two classic mistakes: ignoring a refusal, or throttling revenue for users who agreed.

The Signals You Can Set

GPT lets you configure privacy-related behavior through googletag.pubads().setPrivacySettings(). The settings you will meet most often are:

A separate, older switch, googletag.pubads().set('npa', '1'), marks requests as non-personalized. Check Google's current documentation to see which options apply to your account, since behavior and recommendations evolve.

Consent Strings Do the Heavy Lifting in the EEA and UK

For traffic where TCF applies, you normally do not set a GPT flag by hand. GPT and Google's ad serving read the TCF consent string exposed by your CMP through the standard __tcfapi interface. That is why the CMP has to load before the ad request is made. If the first request fires without a string, Google has no choice but to serve restricted or non-personalized ads.

Step-by-Step Implementation

  1. Load the CMP first. Place the CMP script at the top of the head, before GPT.
  2. Disable the initial load. Call googletag.pubads().disableInitialLoad() and enable single request mode if you use it, so you control when requests go out.
  3. Wait for a decision. Use __tcfapi('addEventListener', 2, callback) and act when the event reports that the user interface is done or consent already exists.
  4. Set privacy flags. For regions where a flag is relevant, call setPrivacySettings() before the first request.
  5. Refresh slots. Call googletag.pubads().refresh() once, after the signal is known.

Testing

Open DevTools and look at the network request to securepubads.g.doubleclick.net/gampad/ads. Check the gdpr and gdpr_consent parameters for TCF traffic. Compare a first visit (no choice yet), an accept, and a reject. A reject should reduce or limit personalization, not remove ads entirely. Test both desktop and mobile layouts, since slots can be created at different times.

Common Mistakes

How FlexyConsent Helps

FlexyConsent is on Google's certified CMP list (CMP ID 317), supports IAB TCF 2.4 and Google Consent Mode v2, and exposes the standard TCF API that GPT reads. Install the script before your ad tags and the consent state is available when requests are made.

Key Takeaways

← Blog Read All →