Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

About rejecting cookies on a landing page

smarquro1
Level 2
Level 2

 

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/we...

 

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

3 Replies
David__Garcia
Level 9
Level 9

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.

 

David__Garcia_0-1636584046211.png

 

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
}

 

 

smarquro1
Level 2
Level 2

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