magepal / magento2-google-tag-manager

Google Tag Manager is a user-friendly, yet powerful and cost-effective solution that is a must-have integration for every Magento store. It simplifies the process of adding and managing third-party JavaScript tags. With dozens of custom events and hundreds of data points our extensions the #1 GTM solution for Magento.
https://www.magepal.com/google-tag-manager.html
259 stars 89 forks source link

#80 GDPR option to check cookie value for cookie group setting #81

Closed GaryHaddon closed 1 year ago

srenon commented 1 year ago

@GaryHaddon, thanks for the for the contribution. Could you provide a sample allowedCookieGroupSettings = JSON.parse(cookieGroupSettings);?

GaryHaddon commented 1 year ago

Hi i added an the example from the issue i created below. Let me know if you would like more info

image
GaryHaddon commented 1 year ago

@srenon I have reviewed a few use cases to this and am going to rewrite it to support more use cases I think we need to support combinations of the following. As some cookie modules have a combination of cookies allowed in an array (with or without a true false flag) they also then set a different value if all cookies are accepted.

"cookies allowed": {"marketing":1,"performance":0}

"cookies allowed": {"marketing","performance"}

"cookies allowed": "all"

"cookies allowed": {"all"}

We should also probably support the inverse too for opt out scenarios.

"cookies rejected": {"marketing":1,"performance":0}

"cookies rejected": {"marketing","performance"}

"cookies rejected": "all"

"cookies rejected": {"all"}

Please let me know your thoughts

Thanks

GaryHaddon commented 1 year ago

Closing as solution above isn't sufficient.