cookie-consent icon indicating copy to clipboard operation
cookie-consent copied to clipboard

default consent on page rendering after cookie banner accepted

Open sachatrauwaen opened this issue 10 months ago • 2 comments

Hi, After a work session with a Ads specialist and reading the google tag manager documention, there is a issue with the setDefaultConsentState in the template.

The setDefaultConsentState need to be called with values respecting regional laws. So for EU most of permissions need to be denied.

And the user accepted permissions need to be set with updateConsentState.

And in gtm_template.tpl the setDefaultConsentState is called with the values comming from the cookies with are not the defaults respecting the region law.

This happen on the page rendering after the cookie banner is accepted and the banner is not shown enymore.

If you agree with this, i can make a pull request for it.

Regards, Sacha

sachatrauwaen avatar Apr 18 '24 12:04 sachatrauwaen

Hi, sorry for the late response. If I understand correctly, it would be ok if the following would be called in the GTM template:

setDefaultConsentState({ ... real defaults ... });
updateConsentState({ ... permissions from the cookie value ... });

Thus setDefaultConsentState and immediately afterwards updateConsentState.

Is that right or am I wrong?

tg666 avatar May 10 '24 03:05 tg666

I think that's right.

If I may contribute to this discussion, I believe what's ideally needed is a region aware Default Consent Setting, which would look similar to the Composite Consent setting. This would allow ISO-3166-1 alpha-2 country code region defaults to be set as per Google Docs.

Here's a mockup of the fields to give the idea... though false/true might be replaced with denied/granted...

Screenshot 2024-06-06 at 14 56 22

This would allow the default state (in Visibility and Default State) to be "tweaked" regionally as required. For example, only setting default of denied in regions (like EU) where this is required... but allowing implied consent by default in more relaxed regions.

robwoodgate avatar Jun 06 '24 13:06 robwoodgate