How to debug your Google Consent Mode implementation? | Articles

 

Introduction

 

In March of this year, Google decided to force advertisers to implement Consent Mode V2, following the Digital Market Act. Google Consent Mode V2 offers a flexible and user-centric way to manage how Google tags behave based on the consent status of your users.

In a previous article, we explained this decision in more detail, but also gave a full overview of what the V2 was bringing. This article provides a detailed walkthrough for digital marketing professionals on how to verify and debug an implementation of Google Consent Mode V2 using Google Tag Manager (GTM) and browser developer tools.

 

Debug with GTM’s preview mode

 

GTM's Preview Mode is invaluable for real-time debugging. It allows you to see which tags are firing and which are not, based on the consent decisions made by users. Make sure to test different scenarios:

  • User grants full consent
  • User denies consent
  • User partially allows consent categories

 

Debug consent variables

First, you’ll want to use the ‘’Consent’’ section of the preview mode. You need to make sure that the way you interact with the cookie banner is being reflected here. So if you refused all the cookies, this is what you should see :

On the other hand, if you accepted all the cookies, you should see that:

With consent preferences set, observe the network requests being made by your tags in GTM's Preview Mode. This helps ensure that no personal data is sent without consent, complying with the ad_storage and analytics_storage settings as per user consent.

What about tags firing?

Now that you made sure that the consent variables are being sent correctly, you can check if your tags are behaving as expected. And this will depend on the version of Consent Mode that you implemented.

With the basic implementation of Consent Mode, as long as no cookies are accepted no Advertising or Analytics tags should fire, therefore, the consent variables should be configured as denied. If no cookies are accepted, your tags should appear as “Tags Blocked by Consent Settings”. The respective tags can only fire once the cookie status has been updated.

With the advanced implementation of Consent Mode, it’s different. Your Google tags can fire, even when you refuse cookies, to allow Google to send a cookieless ping. And of course, if you accept the cookies, your tags are being fired too.

 

Debug with your browser developer tool

 

Browser Developer Tools offer a deeper dive into the inner workings of Consent Mode and what information is actually collected. Once again, the way to debug will depend on the version of Consent Mode that you implemented.

 

Basic implementation

To access the developer tool, use the inspect function and use the network section, then search for collect?v=2.

Go to the payload and find variable gcs. Of course, the value of this variable should match with the consent that you gave on the website.

  • G100: No Consent is Given
  • G110: Advertising consent is given, no analytical
  • G101: No advertising consent is given, but analytical is
  • G111: All consent is given

Advanced implementation

Same as with the basic implementation, you’ll need to look for collect?v=2 in your network section of the developer tool. You’ll also need to find the gcd variable.

In this case, the string should start with 11, use 1 to separate the different consent signals, and ends with a number like 5.

Each letter has a specific meaning that should match with the consent that you gave on the website.

Letter

Description

Example

l

The lowercase L means that the signal has not been set with Consent Mode.

11l1p1l1l5

p

denied by default (no update).

11p1p1p1p5

q

denied both by default and after update.

11p1q1p1p5

t

granted by default (no update).

11t1t1t1t5

r

denied by default and granted after update.

11r1r1r1r5

m

denied after update (no default).

11p1m1p1p5 

n

granted after update (no default).

11n1n1n1n5 

u

granted by default and denied after update.

11u1u1u1u5 

v

granted both by default and after update.

11v1v1v1v5 

 

Conclusion

 

Properly implementing and debugging Google Consent Mode V2 is crucial for compliance and efficient data collection. By using Google Tag Manager and browser developer tools effectively, you can ensure that your website respects user consent preferences while capturing necessary analytics and advertising data.

 

 


publication auteur Margaux Snakkers
AUTHOR
Margaux Snakkers

| LinkedinThis email address is being protected from spambots. You need JavaScript enabled to view it.

 

Tags:

Get in touch

Semetis | Rue de l'Escaut 122, 1080 Brussels - Belgium

welcome@semetis.com

Connect with us

Cookie Policy

This website uses cookies that are necessary to its functioning and required to achieve the purposes illustrated in the privacy policy. By accepting this OR scrolling this page OR continuing to browse, you agree to our privacy policy.