Expand my Community achievements bar.

SOLVED

Integration with Onetrust for cookies is unstable

Avatar

Level 5

Hi everyone,

I have implemented the Opt-In feature on the portal. I have one trust script to block the cookies, and it allows cookies to be created based on the selection of cookie consent by the user. Need help/guidance as if what might be going wrong here.

As per the documents, one trust script needs to load first and then, launch script containing scripts for optIn. Now, the one trust script loads first, and then the rules to create cookies. In launch, based on the cookie consent, if analytical consent is given, I am executing below code:

 

 

  adobe.optIn.approve(adobe.OptInCategories.ANALYTICS, true);
  adobe.optIn.approve(adobe.OptInCategories.ECID, true);
  adobe.optIn.complete();

 

 

On pages, I can see that 1 out of 10 hits - value for adobe analytics(AA) is false, whereas the script was executed in this case as well.

When I run this in the console of the browser, adobe.optIn.permissions, I get to see that value is false for AA.

Screenshot 2023-06-07 at 00.45.57.png

Thanks in advance!

Topics

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

1 Accepted Solution

Avatar

Correct answer by
Level 5

This issue might be caused by a number of factors. Here are some possible reasons and troubleshooting tips:

Order of execution:- Make sure the trusted script is performed before any other scripts that rely on cookie consent. If other scripts run before the trusted script, they may set the AA value before the trusted script can change it depending on the user's acceptance.
Timing:- Select whether the trusted script is performed asynchronously or after a wait. If the trusted script takes some time to run and update the AA value, other scripts that rely on AA may execute before the value is changed.
Script issues:- Check the trusted script for any errors or issues that might prevent it from correctly updating the AA value. Check the logic and make sure the script interacts with the Adobe Analytics library appropriately.
Cache or previous consent:- Confirm that the problem is not caused by browser caching. Clear the cache and try again to confirm that you're testing with new consent options. Check for any previously saved consent settings or cookies that may be incompatible with the present implementation.
Consider whether there are any external variables that might be impacting the behavior. For example, if your portal makes use of any third-party services or integrations that interact with Adobe Analytics, they may be superseding or competing with one another with the opt-in implementation.

Here are some other things you may try:

Look for any issues in the browser console. If there are any mistakes, they may give information about what is causing the issue.
Clear the cookies and cache in your browser. This may assist in resolving any difficulties caused by corrupted cookies or cache.
Try to use a different browser. If the problem only occurs in one browser, it might be a problem with that browser.
Contact Adobe's customer service. If you've done everything above and are still having issues, you may contact the Adobe support team for help.

 

 

View solution in original post

2 Replies

Avatar

Correct answer by
Level 5

This issue might be caused by a number of factors. Here are some possible reasons and troubleshooting tips:

Order of execution:- Make sure the trusted script is performed before any other scripts that rely on cookie consent. If other scripts run before the trusted script, they may set the AA value before the trusted script can change it depending on the user's acceptance.
Timing:- Select whether the trusted script is performed asynchronously or after a wait. If the trusted script takes some time to run and update the AA value, other scripts that rely on AA may execute before the value is changed.
Script issues:- Check the trusted script for any errors or issues that might prevent it from correctly updating the AA value. Check the logic and make sure the script interacts with the Adobe Analytics library appropriately.
Cache or previous consent:- Confirm that the problem is not caused by browser caching. Clear the cache and try again to confirm that you're testing with new consent options. Check for any previously saved consent settings or cookies that may be incompatible with the present implementation.
Consider whether there are any external variables that might be impacting the behavior. For example, if your portal makes use of any third-party services or integrations that interact with Adobe Analytics, they may be superseding or competing with one another with the opt-in implementation.

Here are some other things you may try:

Look for any issues in the browser console. If there are any mistakes, they may give information about what is causing the issue.
Clear the cookies and cache in your browser. This may assist in resolving any difficulties caused by corrupted cookies or cache.
Try to use a different browser. If the problem only occurs in one browser, it might be a problem with that browser.
Contact Adobe's customer service. If you've done everything above and are still having issues, you may contact the Adobe support team for help.

 

 

Avatar

Level 5

Hi @ranjithd , I have already checked the suggestions mentioned by you. When I load the script from Onetrtust's CDN server - it fixes the issue to some extent.

I have added another query https://experienceleaguecommunities.adobe.com/t5/adobe-experience-platform-data/tags-are-sent-with-f... 

If you can go through the description, you might provide some input to me.

 

Best

Ritendra