Expand my Community achievements bar.

Onetrust c0002 cookies not getting enabled upon accepting the cookie

Avatar

Level 2

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

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

4 Replies

Avatar

Community Advisor

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!


Avatar

Adobe Champion

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.

 

igupta_0-1726495034764.png

 

Avatar

Community Advisor

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

bjoern__koth_1-1726495508719.png

 

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.

bjoern__koth_3-1726495812782.png

 

Cheers from Switzerland!


Avatar

Adobe Champion

@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