How do you properly activate Google Consent Mode v2?

First, I would like to thank you for adding compatibility for Google consent mode. It would have been even better if you had updated Zaraz’s changelog. :wink:

Now, I need clarification about the functionality. I added google_consent_default and google_consent_update properties, as suggested in the doc. Then, I set up both Google tools (GA and Google Ads) to skip consent.

However, both tools create cookies without consent. What did I miss?

I don’t think you’re missing anything. I have that issue for a couple of days and have signalised the way how it should be done. Please read my other posts.

I don’t think the Zaraz team has properly implemented it yet. They can send an event, with a consent mode attached, but not a consent mode event, as it is requested by Google.

I implemented their solution for a couple of days and I still have the notice in analytics asking me to send consent signals.

Sending the Consent Mode signals and running GA without cookies are two different things. For now, the easiest solution is to (a) duplicate your GA tool (b) in the Permissions of the duplicate, disable Access to Key Value storage, and (c) load the one without cookies when there isn’t consent, and the one with cookies when consent exists.

I read your post, @juliantosun, but I didn’t understand what you tried to do. I think I have a better understanding now. I integrated Google Ads consent mode last month with the official code snippet, and it’s cookie-less without the user’s consent. So, when I saw the restricted properties for Google Consent, I immediately assumed that it would act the same, but it didn’t. The documentation needs to be more accurate in that regard.

@yoav_zaraz My question now is: If cookies are created no matter what, what does that setup even do? What is the purpose?

Thank you both for your answers.

but this is still not sending the consent signals.

I’ve with all provided solutions not yet achieved to get rid of the consent mode signal in Analytics.

@yoav_zaraz Tried this exact approach with the Consent and duplicating the GA tool but still getting warnings in GA that I’m not sending consent.

This topic should be merged with this one:

Was anybody able to actually get rid of the GA warnings with Zaraz?

Any updates here. I don’t think this actually can be solved straight-forward with Zaraz.

I think there is a fundamental misunderstanding of what is Google expecting in the Zaraz department.

All solutions provided by Zaraz come back to send Pageviews with attached consent state (which works)

But Google is expecting consent pings/events (not pageview events).

I’ve not seen any evidence of anybody being able to get this solved with Zaraz.

I think Zaraz is a great invention and the way tracking should be, but it’s annoying that they don’t try to understand what we’re trying to explain. Every day I’m checking if there’s a new response.

Zaraz sends both pageviews as well as all other events with consent with the attached consent data.
It’s unclear what issue you’re seeing and how you configured your consent settings, so it’s very difficult to offer help here.

The simplest way to make sure consent status is always sent to is to add <script>zaraz.set('google_consent_default', {...})</script> right after <body> on all your pages.

Hello, @yoav_zaraz how exactly we have to implement this script on website, using ZARAZ? or by create some js with that default script and attach to every page? This script must be implemented in header or in body? Logic of update value that depends on the user consent has to be managed on the website’s side? Or in ZARAZ? Is consent mode somehow integrated with consent banner from ZARAZ or we need separate banner? Also, if it can be synced with ZARAZ consent banner, how it can work in pair? Like banner is loaded by ZARAZ and how this can change value of consent mode, like id’s in consent mode and those purposes that u setup are different& Sorry for stupid question but I’ve never configured something like that and all of this - unclear to me. Thanks for response.

But @yoav_zaraz can you please confirm that you understand that google is requesting us to send 3 events to them. Default Consent, Pageview and updated consent.

Can you confirm Zaraz is able to send these events.

Just sending PageView with attached consent is not enough for us in the EU.

Please confirm that you understood this or deny and explain that I’m wrong.