Home › Forums › Newsletter Plugin Support › Deactivate Cookie
- This topic has 6 replies, 5 voices, and was last updated 3 years, 10 months ago by Johannes Strodl.
-
AuthorPosts
-
May 17, 2018 at 1:15 pm #94193AnonymousInactive
I’m getting my site ready for optimal GDPR and potentially ePrivacy compliance.
While cookies are not a problem per se, I want to get rid of unnecessary cookies anyways.
In my analysis I have realised that The Newsletter Plugin sets a cookie – in my implementation on the confirmation page right after clicking on the double-opt-in-link.
As far as I can tell after some research, the “newsletter”-cookie is only used for the Locked Content Extension…
https://www.thenewsletterplugin.com/locked-content-extension-1-0-0I don’t use this extension and I don’t have any other use case which would require tracking a newsletter subscriber amongst other website visitors.
Long story short – Is there a hook / filter which can be used to deactivate the cookie? Or are there any plans to provide an option for that in the admin panel in an upcoming release?
Thanks!
May 17, 2018 at 2:27 pm #94235StefanoKeymasterHi, the cookie is, as you noted, a tech cookie. Anyway after the next release where we made some important changes in the cire, we want to release even more features, like the conrol over the cookie and the ip address.
Stay tuned, I think that will be available shortly. We’re doing our best!
Stefano.
May 17, 2018 at 3:01 pm #94259AnonymousInactiveHi Stefano,
Thanks for having this on the roadmap!
I don’t fully agree with the statement it’s a “technical cookie” since the cookie string makes it possible to identify an actual user.
I’m killing the cookie with a small function for now.
Looking forward to a more robust solution in a future release!
Thanks!
May 30, 2018 at 9:41 pm #98673qortnodParticipantHi Stefano,
I am wondering if you can give us an update on the issue of disabling the functional cookie (& the removal of IP addresses)?Thanks!
Vincent
June 3, 2018 at 5:13 pm #99672qortnodParticipant@noblesavage
I’m killing the cookie with a small function for now.
Is it possible to integrate your solution in a separate, “home made” plugin?
Thanks in advance for your response,
VincentDecember 4, 2020 at 12:44 pm #263062S.ParticipantHi,
I would be very interested in how to remove the cookie as well. Any updates on that topic?
Thank you
December 6, 2020 at 12:47 pm #263140Johannes StrodlParticipantYou can remove any cookie by modifying the HTTP header before it is send to the client.
1) Create a child theme from your theme. (There are several excellent tutorial on the web which explains the creations of child themes. It is very easy.)
2) Create a “functions.php” file in the root directory of your new child theme.
3) Add a hook in “functions.php” for wordpress to modify the HTTP header before it is send:<?php // filter cookies function my_remove_cookies($headers) { if (isset($_COOKIE['newsletter'])) { unset($_COOKIE['newsletter']); setcookie('newsletter', null, -1, '/'); } return $headers; } add_filter('wp_headers', 'my_remove_cookies');
This will remove the cookie named “newsletter”. The cookie will never be published to the client. Beware if you use a caching plugin for wordpress. Sometimes the cached page can’t be changed by the “wp_headers” hook any more. Then deeper studies of the caching machinery is needed to remove the header part of the cookie.
When i have time, i will create a plugin to remove cookies by name. Maybe this is a needful thing for such problems.
Greetings,
Johannes -
AuthorPosts
- You must be logged in to reply to this topic.