Onetrust Opt-out Model - Cookie Deletion | Community
Skip to main content
Level 2
July 8, 2024
Solved

Onetrust Opt-out Model - Cookie Deletion

  • July 8, 2024
  • 5 replies
  • 1930 views

Hello, 

 

I am currently implementing onetrust and we are going with an opt-out model where the cookies are placed in the users browser by default and the user needs to opt-out of them. When I reject all cookies I see all my calls being blocked which is working as expected but I still see the cookies in my browser. No data is being sent to the cookies but the cookies are still there. Is this an issue? I have looked at other organizations' do the same. They block calls and cookies are still in the browser. Is this normal for an opt-out approach? 

I'm also aware that some third party cookies and secure first party cookies cannot be deleted via javascript. Is there a way around this and to delete cookies based on users consent?  

Best answer by Ankit_Chaudhary

Hi @at9191 

well cookies are stored locally so I don't think so it will be an issue since they are already been set before user opt-out but if they do you are not utilizing them to collect the data or any user PII.

if you wish you can delete specific cookies by provide custom logic after user opt-out however you need to identify unwanted cookies which you wish to delete(it could be some extra work in your plate).

5 replies

Ankit_Chaudhary
Community Advisor
Ankit_ChaudharyCommunity AdvisorAccepted solution
Community Advisor
July 9, 2024

Hi @at9191 

well cookies are stored locally so I don't think so it will be an issue since they are already been set before user opt-out but if they do you are not utilizing them to collect the data or any user PII.

if you wish you can delete specific cookies by provide custom logic after user opt-out however you need to identify unwanted cookies which you wish to delete(it could be some extra work in your plate).

Level 1
April 27, 2026

 

 

Level 2
April 27, 2026

Facing Issue when user declines consent in EU, cookies are still getting placed-

I am using default consent model as “Pending” in websdk extension, in European region when user is rejecting cookies, tracking data is not sent which is expected, however cookies are still getting placed. How can I fix this? can any one provide any custom code logic to remove cookies if user rejects it at first as by default cookies are not placed? 

Additionally, when user rejected and then accepts the cookie interact call is not getting fired though on first accept all click its getting triggered.

ChiragKu2
Level 1
April 29, 2026

I had similar issue last year and what I anticipate is, you must be using default consent as pending and setConsent-out when someone rejects the consent and that created the real issue.

 

I would suggest you to only trigger set consent out only when user accepted the consent and later wants to reject it.

 

As per Adobe’s doc when you trigger set consent out - it blocks calls but cookies are still placed in certain scenarios 

 

 

I have already created a blog post on the fix of this issue please refer the same & issue should be fix - 

https://medium.com/@chiragkulshreshtha/aep-websdk-consent-simplified-95758b246c54

 

Level 2
April 29, 2026

Hey Chirag,

Thanks for explaination and reference article. As data collection call is not getting triggered do you think still its compliance issue?

If adobe is saying this is the expected behaviour. What do you think?