With the new Cookie law i’m trying to find a way i can remove all cookie from my site with a PHP script. I have got a script which works but it doesn’t remove google analytics cookie.
How can I remove google analytics cookie?
foreach($_COOKIE as $key => $value) {
setcookie($key, '', time()-1000);
setcookie($key, '', time()-1000, '/');
}
You need to pass the domain in as the 5th paramater…