pressidium / pressidium-cookie-consent

🍪 Lightweight, user-friendly and customizable cookie consent banner to help you comply with the EU GDPR cookie law and CCPA regulations.
https://wordpress.org/plugins/pressidium-cookie-consent/
GNU General Public License v2.0
53 stars 4 forks source link

dataLayer.push and Google Tag Manager #67

Open nofcfro opened 6 months ago

nofcfro commented 6 months ago

HI, Congrats on the plugin! I have a new tip. In order to correctly configure Google Tag Manager with Google Consent Mode v2, your plugin must generate triggers through a dataLayer.push({event:xxx}. For example: pressodium_necessary_consentgiven, pressodium_adv_consentgiven, pressodium_stats_consentgiven, pressodium_history_change. Through these triggers , I can start tags, for example, I can create the "Facebook Pixel" tag and give "pressidium_adv_consentgiven" as a trigger. Your plugin cannot be used by Google Tag Manager :( Screenshot 2024-05-13 alle 21 26 02