Onetrust c0002 cookies not getting enabled upon accepting the cookie | Community
Skip to main content
Level 2
September 13, 2024
Question

Onetrust c0002 cookies not getting enabled upon accepting the cookie

  • September 13, 2024
  • 2 replies
  • 1485 views

What is the configuration change that we may have to do in order to enable the c0002 cookie(performance cookies) post enabling the cookie?

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
September 13, 2024

Hi @pshetty1 

that should be done automatically from OneTrust. What do you see when you look at the OptanonConsent cookie?

it contains the consent categories at the end of the string.

Cheers from Switzerland!
Isha Gupta
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 16, 2024

Hi @pshetty1 ,

 

Are you looking to understand how to trigger Adobe Analytics call after enabling the cookie? I think depending on your implementation, you would have to look for the triggered event and then use that event as trigger for Adobe Analytics call. For example, for us, once user accepts the cookie, we trigger a direct call trigger once consent change is detected. The Direct call identifier is then used as the trigger for analytics call trigger. Sharing outline of the rule. Let me know if this is what you are looking for and I can provide more details if required.

 

 

bjoern__koth
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 16, 2024

I typically register an event in the OneTrust.OnConsentChanged callback as soon as the library is loaded.

 

and the custom code internally triggers which ever rule is listening to it.

const consentInterval = setInterval(() => { // check if loaded if (typeof window?.OneTrust?.OnConsentChanged === "function") { clearInterval(consentInterval); window.OneTrust.OnConsentChanged(() => { _satellite.track("consent_changed"); }); } }, 250);

 

All you will have to do is adding this direct call event to your analytics (and other rules which shall be triggered).

Just make sure your rules are respecting the appropriate cookie consent category.

You will also want to make sure to not page view trigger the rule more than once.

 

Cheers from Switzerland!
Isha Gupta
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
September 16, 2024

@bjoern__koth ,
Somewhat similar process just geekier way :D. No less expected!! 🙂

 

Just for better context here - The event in my rule trigger on OnConsentChanged event , look for OneTrust Active Groups and then set a direct call identifier.

 

But of course, your rule looks cleaner to me and I would probably go with that for future implementations. 🙂

 

Best,

Isha