|
Post by michelp on Feb 23, 2024 9:17:57 GMT 1
Hi, I'm using your plugin and it works great, but I have a problem with the Google consent signals. Google still show the message "Ad personalization consent signals were not detected". I implemented the codes as discriped in the faq, but there's no change. I use JCH optimize but n3t plugin is excluded. Is there something else I have to do to solve this? url: jouwnaambord.nl/Thanks. Michel P
|
|
|
Post by n3t on Feb 23, 2024 13:00:36 GMT 1
Hi,
based on Google Consent v2 you need to send to google 2 additional fields, - ad_user_data - Sets consent for sending user data to Google for advertising purposes. - ad_personalization - Sets consent for personalized advertising.
You can modify basic example as follows in Accept and change code
gtag('consent', 'update', { 'ad_storage': n3tConsentManager.allowedCategory('marketing') ? 'granted' : 'denied', 'ad_user_data': n3tConsentManager.allowedCategory('marketing') ? 'granted' : 'denied', 'ad_personalization': n3tConsentManager.allowedCategory('marketing') ? 'granted' : 'denied', 'analytics_storage': n3tConsentManager.allowedCategory('analytics') ? 'granted' : 'denied', });
and in initialization code
window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('consent', 'default', { 'ad_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied', 'analytics_storage': 'denied', 'wait_for_update': 1000 });
This would send required data to google and allow everything aroiund marketing based on agreement on marketing section.
If you want to separate these agreements, you need to create new custom sections, give it proper aliases (for example ad_user_data and ad_personalization) and modify the above Accept code to something like this:
gtag('consent', 'update', { 'ad_storage': n3tConsentManager.allowedCategory('marketing') ? 'granted' : 'denied', 'ad_user_data': n3tConsentManager.allowedCategory('ad_user_data') ? 'granted' : 'denied', 'ad_personalization': n3tConsentManager.allowedCategory('ad_personalization') ? 'granted' : 'denied', 'analytics_storage': n3tConsentManager.allowedCategory('analytics') ? 'granted' : 'denied', });
Pavel
|
|
|
Post by n3t on Feb 23, 2024 13:19:17 GMT 1
I modified the FAQ to cover Google Consent v2.
|
|
|
Post by michelp on Feb 27, 2024 10:20:55 GMT 1
Thanks, looks like the problem is solved!
|
|