About rejecting cookies on a landing page | Community
Skip to main content
Level 2
November 8, 2021
Solved

About rejecting cookies on a landing page

  • November 8, 2021
  • 3 replies
  • 1186 views

 

Hello,

 

Regarding the cookie rejection configuration through the API explained in the document "Web application tracking opt-out":

 

https://experienceleague.adobe.com/docs/campaign-classic/using/designing-content/web-applications/web-application-tracking-opt-out.html?lang=en

 

From the given example:

 

<div onClick="NL.ClientWebTracking.closeOptOutBanner(this);" id="defaultOptOutBanner">
<p>Please insert your message here.
<a onClick="NL.ClientWebTracking.allow();" class="optout-accept">Accept</a>.
<a onClick="NL.ClientWebTracking.forbid();" class="optout-decline">Decline</a>.
</p>
</div>

 

After a client clicks inside an email, the nlid, nllastdelid and UUID cookies are generated, and by accepting or rejecting the use of cookies, effectively, the acoptout cookie is generated with the given value according to the client's preference.

 

However, by rejecting, and having the acoptout cookie the value of 1, that is, it does not accept cookies, I understand that the ones corresponding to the tracking should be deleted, but it is not so, they still appear.

So I would like to know how I can do to solve this particular case so that cookies are deleted after a user rejects the use of cookies on a landing, mirror page, etc...

 

Regards,

 

Sergio

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by david--garcia

I think web tracking reads the acoptout cookie and if its 1 it does not* create/log records into adobe campaign, but I don't think it goes as far as deleting the cookies on the client side.

 

 

If you want to delete all cookies if the acoptout is set to 1, you can create your own function, there are some examples on this page. https://www.codegrepper.com/code-examples/javascript/delete+all+cookies+javascript

 

Semantically it should go as following

 

If acoptout value = 1 { //js function to read acopout cookie value here
 get a list of all cookies and delete them //function to delete all cookies except acoptout
}

 

 

3 replies

david--garcia
david--garciaAccepted solution
Level 10
November 10, 2021

I think web tracking reads the acoptout cookie and if its 1 it does not* create/log records into adobe campaign, but I don't think it goes as far as deleting the cookies on the client side.

 

 

If you want to delete all cookies if the acoptout is set to 1, you can create your own function, there are some examples on this page. https://www.codegrepper.com/code-examples/javascript/delete+all+cookies+javascript

 

Semantically it should go as following

 

If acoptout value = 1 { //js function to read acopout cookie value here
 get a list of all cookies and delete them //function to delete all cookies except acoptout
}

 

 

david--garcia
Level 10
November 17, 2021

Did you manage to get it working?

smarquro1Author
Level 2
November 17, 2021

I have yet to implement it, when I do some testing I'll let you know.

Sukrity_Wadhwa
Community Manager
Community Manager
December 9, 2021

Hi @smarquro1,

Were you able to resolve this query with the help of the given solution or do you still need more help here? Do let us know.
Thanks!

Sukrity Wadhwa