Home > How do I clear all SnapEngage cookies when my user logs out of my site?

Categories:


(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.

&lt;a href='#'onclick=exampleSignOut()&gt;Sign Out&lt;/a&gt;

Then you would just add the above-mentioned function into your exampleSignOut() function.

function exampleSignOut() {
    ...
    SnapEngage.clearAllCookies();
    ...
}

Did you find this article helpful?

Not HelpfulNeeds WorkSo-soHelpfulVery Helpful (2 votes, average: 3.00 out of 5)
Loading ... Loading ...

Published January 12, 2012