Why doesn’t Google Consent Mode v2 work with my cookie plugin?

Kilian Müller
Kilian MüllerOwner of 1hold.de · Google PartnerUpdated
Consent ModeGoogle Certified Specialist

Consent Mode v2 fails with a cookie plugin when the plugin does not pass the visitor’s choice to the Google tags in the form Google expects: a default state before any tag fires, and an update with all four consent values as soon as the visitor decides. Many plugins only block or release scripts, or send just two of the four values. Google then receives no or incomplete consent signals.

Consent mode itself is not a banner. It only takes over what your cookie plugin reports. The plugin, often called a consent management platform or CMP, is responsible for asking, storing and passing on the choice.

Why does my cookie plugin not work with Consent Mode v2?

  • No Consent Mode integration. Some plugins only block scripts until consent is given. That can be compliant, but without a consent mode integration Google never receives a consent state.
  • Only two values. Version 2 needs ad_storage, analytics_storage, ad_user_data and ad_personalization. Older plugin versions often send only the first two.
  • Default state too late. According to Google, the default must be set on every page before any command that sends measurement data. If the plugin loads after the Google tag, the first hits go out without a state.
  • Asynchronous loading without waiting time. If the banner loads asynchronously, the default needs wait_for_update, so tags wait briefly for the update.
  • Plugin and Tag Manager both set consent. If the plugin sets consent itself and a Tag Manager template does the same, the states can overwrite each other.
  • Hard-coded Google tag. A Google tag added by the theme or another plugin can fire outside the plugin’s control.

How do I set it up correctly?

  1. Check the plugin. Use the current version and turn on its Google Consent Mode v2 option. Google lists consent platforms with a tested integration in its CMP partner programme.
  2. Choose one place for consent. Either the plugin sets default and update directly, or a consent mode template in Tag Manager does it. Not both.
  3. Use the Consent Initialization trigger. In Tag Manager, the tag that sets the default fires on Consent Initialization – All Pages, before all other triggers.
  4. Remove duplicate tags. Every Google tag should run through Tag Manager or through one clean gtag.js snippet, not both.
  5. Decide on basic or advanced. In basic mode, Google tags only load after consent. In advanced mode they load with a denied default and send cookieless pings. Which one fits is a question for your data protection advice.

How do I test the setup?

Open your website in Tag Assistant. In the first event, the default state with all four values must already be visible. Accept in the banner and check that the values change to granted, then repeat in a private window with “Reject” and check that they stay denied. In Tag Manager, the consent overview shows which tags check which consent type. If a cookie scanner still reports tracking without consent, see Why is my cookie scanner still reporting tracking without consent?

Use a current plugin with an active Consent Mode v2 integration, let exactly one place set default and update, and test both accept and reject in Tag Assistant.

Sources

Want your cookie plugin and Consent Mode v2 to work together reliably? We check plugin, Tag Manager and tags and test every consent choice. Book a free intro call or read more about our tracking services.

Need personal advice?

Our Google-certified experts are happy to help – free and without obligation.

Book a meeting