# Set up Google Consent Mode v2

> Map OptinStack's four consent categories onto Google Consent Mode v2 and keep them in sync as visitors choose.

Author: OptinStack Team  
Published: 2026-06-28  
Page: https://community.optinstack.com/articles/set-up-google-consent-mode-v2  
Markdown: https://community.optinstack.com/llms.md/articles/set-up-google-consent-mode-v2

Google Consent Mode v2 lets Google tags adjust their behavior based on the visitor's consent state\. OptinStack maps its four categories onto the Google consent types and updates them whenever the visitor chooses\.

For the full implementation reference, including dataLayer events and signal mapping, see the [Google Consent Mode v2 docs page](https://docs.optinstack.com/consent-mode)\.

*OptinStack category to Google consent type mapping*

| OptinStack category | Google consent type |
| --- | --- |
| necessary | security_storage |
| analytics | analytics_storage |
| marketing | ad_storage, ad_user_data, and ad_personalization |
| preferences | functionality_storage and personalization_storage |

## Enable Consent Mode v2

There is no separate project\-wide dashboard switch for Google Consent Mode\. If you install OptinStack directly on the page, the runtime's built\-in Google consent bridge sets defaults from your banner mode and updates them when visitors change consent\. If you use the OptinStack GTM template, leave the template's Enable Google Consent Mode v2 field turned on so GTM owns consent state inside the container\.

> **Info:** When Global Privacy Control is enabled, OptinStack starts all optional consent types as denied, matching GPC's opt-out intent.

### Do I need to set default consent state in GTM?

If you use the OptinStack GTM template, yes: configure its default consent rows so GTM has explicit defaults during Consent Initialization. If you are not using GTM, the runtime's built-in bridge sets Google consent defaults from your active banner mode.

### What happens when a visitor changes a category?

OptinStack updates Consent Mode state when the visitor changes a category. Google tags configured for consent mode can react to the new state without a page reload.
