Home > How do I clear all SnapEngage cookies when my user logs out of my site?
Categories: JavaScript API
(Last Updated On: )
About This Article
The purpose of this article is to provide a comprehensive overview of how to clear all SnapEngage cookies when my user logs out of your site.
Add a call for the following SnapEngage API function whenever you would like the cookies to be deleted.
SnapEngage.clearAllCookies();
Note- place your JS Api below the line of code that reads :
/* Place your SnapEngage JS API code below */
Example
You might have a simple Sign Out link that runs a function from the <a onclick="">
event.
<a href='#'onclick=exampleSignOut()>Sign Out</a>
Then you would just add the above-mentioned function into your exampleSignOut() function.
function exampleSignOut() {
...
SnapEngage.clearAllCookies();
...
}
Published January 12, 2012