Consent Mode V2 Signals

 

Google are introducing 2 new consent signals:

ad_user_data: controls whether user data can be sent to Google for advertising purposes.
ad_personalization: controls whether personalized advertising (remarketing) can be enabled.

Testing Consent Mode / GDRP features involves the following steps:

1. Hit F12 in your browser, then go to Console -> Storage and remove any cookies  prefixed 'cookie' e.g. 'cookieConsentGranted' etc.
2. Go to Console -> Local Storage and remove 'consentMode' value
3. Once done, put GTM in Preview mode and refresh your site.
4. Accept cookies and check if GA4 Configuration (Google Tag) is firing.
5. Optionally (as a developer) you can check Console -> Network requests for any requests to https://region1.google-analytics.com/g/collect?v=

Also when checking browser requests in the F12 -> Console -> Network tab, you can inspect 1 important parameter:

gcs - Encodes the current state of the user’s consent. The gcs parameter always begins with “G1” and is followed by two other digits, either 1 or 0. The G1 is a constant that indicates that the parameter is a GA4 consent mode parameter, so the first 1 doesn’t tell us anything.

G100     No consent has been granted.
G110     Google Ads has consent, Google Analytics does not.
G101     Google Analytics has consent, Google Ads does not.
G111     Both Google Ads and Google Analytics have consent.

gcd - This is a new parameter named gcd. GCD is present in every interaction with Google services, regardless of whether Consent Mode is enabled or not. It also has information on how the consent signal was generated.

gcd=11[ad_storage]1[analytics_storage]1[ad_user_data][1][ad_personalization]

Examples of how gcd parameter may look:

gcd=11p1p1p1p5

ad_storage=denied
analytics_storage=denied
ad_user_data=denied
ad_personalisation=denied

gcd=11t1t1t1p5

ad_storage=granted
analytics_storage=granted
ad_user_data=granted
ad_personalisation=denied

BASIC vs ADVANCED CONSENT MODE

There is no exact documentation on the difference between Basic Consent Mode and Advanced Consent Mode but from what we have gathered so far here is how we believe this works and what we have implemented in our module.

1. If you’ve opted for Basic Consent Mode, then the consent widget is displayed and no tags are firing e.g. nothing is being pushed into dataLayer[] object, no _ga cookie is set, nor _ga_XX
2. When the cookies are accepted, tags are firing, data is being pushed into dataLayer[] object
3. When the cookies are declined, tags are not firing, nothing is being pushed into dataLayer[] object

ADVANCED CONSENT MODE

1. If you’ve opted for Advanced Consent Mode, then consent widget is displayed, no tags are firing until consent is granted to declined
2. If customers grants consent, dataLayer[] is initialized, tags are firing including all the Google Consent Signals, gtag(‘consent’,’update’) is executed with the selected signals depending on accepted types of cookies e.g. essentials, marketing, analytics etc.
3. If customers decline consent, dataLayer[] is initialized, tags are firing BUT THE DIFFERENCE here is that gtag(‘consent’,’update’) is executed with DENIED state for all signals such as ad_user_data, ad_personalization, ad_storage, analytics_storage + V2 signals (ad_user_data, ad_personalization).

The tags are firing but their execution is blocked by the Built-in consent checks in the consent configuration of the tag. This means that although tags are firing, they do not execute the same way as they would in basic consent mode. This allows GA4 to build data models.

There is this superb article that you need to check as well - https://www.simoahava.com/analytics/consent-mode-v2-google-tags/

 

Consent Signal States

If correctly implemented, by default all consent signals should be in state 'denied' as shown below. Once consent is granted, signals get updated with state 'granted'. In the following example, you can see how dataLayer[] looks like.

{ } JS CODE Array(16)  [  Arguments,  {…},  {…},  {…},  {…},  {…},  {…},  Arguments,  {…},  {…},  …  ] ​0:  Arguments  {  0:  "consent",  1:  "default",  2:  {…},  …  } ​​0:  "consent" ​​1:  "default" ​​2:  Object  {  ad_storage:  "denied",  analytics_storage:  "denied",  functionality_storage:  "denied",  …  } ​​​​​​          ad_personalization:  "denied" ​​​​​          ​ad_storage:  "denied" ​​​​​          ​ad_user_data:  "denied" ​​​​​          ​analytics_storage:  "denied" ​​​​​          ​functionality_storage:  "denied" ​​​​​​          personalization_storage:  "denied" ​​​​​          ​security_storage:  "denied" ​​​​​​          wait_for_update:  500 ​​​:  Object  {  …  } ​​callee:  function  gtag() ​​"gtm.uniqueEventId":  1 ​​length:  3 ​​Symbol(Symbol.iterator):  function  values() ​​:  Object  {  …  } ​1:  Object  {  visitorLoginState:  "Logged  out",  visitorLifetimeValue:  0,  visitorExistingCustomer:  "No",  …  } ​2:  Object  {  pageType:  "home"  } ​3:  Object  {  "gtm.start":  1726045597642,  event:  "gtm.js",  "gtm.uniqueEventId":  2  } ​4:  Object  {  persist:  {}  } ​5:  Object  {  event:  "gtm.dom",  "gtm.uniqueEventId":  3  } ​6:  Object  {  event:  "gtm.load",  "gtm.uniqueEventId":  9  } ​7:  Arguments  {  0:  "consent",  1:  "update",  2:  {…},  …  } ​​0:  "consent" ​​1:  "update" ​​2:  Object  {  ad_storage:  "granted",  security_storage:  "granted",  functionality_storage:  "granted",  …  } ​​​​​          d_personalization:  "granted" ​​​​​          ​ad_storage:  "granted" ​​​​​          ​ad_user_data:  "granted" ​​​​​​          analytics_storage:  "granted" ​​​​​​          functionality_storage:  "granted" ​​​​​          ​personalization_storage:  "granted" ​​​          security_storage:  "granted" ​​​:  Object  {  …  } ​​callee:  function  gtag() ​​"gtm.uniqueEventId":  10 ​​length:  3 ​​Symbol(Symbol.iterator):  function  values() ​​:  Object  {  …  } ​8:  Object  {  event:  "gtm.linkClick",  "gtm.elementClasses":  "action  accept-all",  "gtm.triggers":  "4,5",  …  }

Extensions for Magento

Anowave is an extension developer for Magento 1.x and Magento 2.x platforms. We provide a wide range of premium extensions for our in-house and public clients. The extensions we offer extend the capabilities of Magento and provide bespoke functionality. They also fill some gaps in the functionality provided by the base platform and help customers choose Magento as their preferred eCommerce platform.

The extensions we offer are part of our full-range Magento service, which also includes a Premium Helpdesk where customers can speak with actual software engineers and have their issues resolved without hassle. Premium-labeled modules also include free installation, configuration, testing, etc.