Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

About rejecting cookies on a landing page

Avatar

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

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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
}

 

 

View solution in original post

4 Replies

Avatar

Correct answer by
Community Advisor

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
}

 

 

Avatar

Community Advisor

Did you manage to get it working?

Avatar

Level 2

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

Avatar

Administrator

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