Google Consent mode v2 implementation using Adobe Launch | Community
Skip to main content
Madhusudan_S
Level 2
May 2, 2024
Question

Google Consent mode v2 implementation using Adobe Launch

  • May 2, 2024
  • 2 replies
  • 1669 views

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

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

2 replies

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 2, 2024

Hi @madhusudan_s 

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 @farazhusain 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

Cheers from Switzerland!
Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
May 2, 2024

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.

FarazHusain
Adobe Employee
Adobe Employee
May 2, 2024