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
43 stars 3 forks source link

dataLayer.push and Google Tag Manager #67

Open nofcfro opened 2 months ago

nofcfro commented 2 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