FS.clearUserCookie - Separating identity in shared browsers

If you're encountering issues with shared identities, you may want to use the FS.clearUserCookie call.  This will delete the FullStory's user cookie from the end-user's browser.  On their next page visit, they will be recorded as a brand new user.

FS.clearUserCookie is available to call immediately after the FullStory recording snippet has been parsed. The below chunk of JS code can be included on your login page after your recording snippet, to have the effect of starting a fresh session each time someone visits it. 

// The following line will clear the FullStory user cookie, 
// which causes this page to begin a new session,
// allowing the next FS.identify() call to specify a fresh uid.

You may also delete user cookies only if the user has previously been identified - to do so simply pass true as an argument.  Cookies for unidentified users will not be deleted.  This is useful if you are clearing the user cookie to avoid the problems caused when multiple users are sharing the same computer.

// The following line will clear the FullStory user cookie for identified users only.

Need to get in touch with us?

The FullStory Team awaits your every question.

Contact us