Hi All,
Anyone done poc/pov/implementation for Google consent mode v2 implementation using Adobe launch .
I got some soultion using below code
gtag('consent', 'default', { 'ad_storage': 'denied', 'analytics_storage': 'denied' });
but anyone recent done same approach.
Thanks & Regards,
Madhusudan Sura | +919423067216
Thanks & Regards,
Madhusudan Sura | +919423067216
I implemented something like this for a client and seems to work, given that the Data Element "consent" is an object, containing your user's currently given consent with attributes "marketing", "analytics" and "personalization".
/**
* Sample "consent" Data Element response
* {
* marketing: true,
* analytics: false,
* personalization: true,
* }
*/
const consent = _satellite.getVar("consent", event) || {};
gtag('consent', 'default', {
'ad_storage': consent.marketing ? 'granted' : 'denied',
'analytics_storage': consent.analytics ? 'granted' : 'denied',
'ad_user_data': consent.marketing ? 'granted' : 'denied',
'ad_personalization': consent.personalization ? 'granted' : 'denied',
'wait_for_update': 500
});
Alternatively to or in combination with the dedicated "consent" Data Element, you can also use the approach @fhusain suggested in combination with above code, using the "adobe.optIn" API
to map the values. However, I prefer having one Data Element that is used as base for both the Adobe API and the Google Consent Mode.
Hope that helps,
Björn
I second the dedicated "consent" Data Element... process the consent once, then use for everything... if you need to make changes or updates, it's in one place.
Views
Replies
Total Likes
So where is this implemented? As a condition for the Google related rules?
Views
Replies
Total Likes
@fahadharur1 you will need to inject this on page load or at least, before you load any google library
Hey @Madhusudan_S This thread might help - https://experienceleaguecommunities.adobe.com/t5/adobe-analytics-questions/implementation-of-consent...
Views
Likes
Replies
Views
Like
Replies
Views
Like
Replies
Views
Likes
Replies