Reputation: 55
Using javascript , how do I clear/ remove the values of Google Analytics cookies of _gid and _ga ?
Upvotes: 3
Views: 1619
Reputation: 55
For anyone who is looking for the answer
document.cookie = '_ga=; path=/; domain='+ domainValue + '; expires=' + new Date(0).toUTCString();
document.cookie = '_gid=; path=/; domain='+ domainValue + '; expires=' + new Date(0).toUTCString();
Upvotes: 1