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

Categories:


(Last Updated On: August 4, 2021)

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 (No Ratings Yet)
Loading ... Loading ...

Published January 12, 2012