Home > Keep visitor information secure by closing the chat window on chat end

Categories:


(Last Updated On: August 5, 2021)

About This Article

The purpose of this article is to provide a comprehensive overview of how to Keep visitor information secure by closing the chat window at the end of a chat.

Ensuring that your visitor’s data is secure is extremely important. By default, once a chat is closed, the chat window remains open, and the information contained within the chat dialogue is retained. This allows the visitor to reference a previous conversation if a chat is closed. But in some cases, it can mean that information provided by the visitor during the chat isn’t completely deleted.

To prevent this, we have a way of programmatically closing the chat window to ensure the previous chat dialogue is removed entirely and can no longer be referenced by the visitor. Closing the chatbox history will prevent sensitive information from being seen or shared.

How to set this up

In order to apply this functionality, you will need to add the following to your SnapEngage code snippet, under the JS API section:


/* Close chat window on end chat */
var event = SnapEngage.callbacks.CHAT_ENDED;
function callback() {
SnapEngage.endChat({ closeChatBox: true });
}
SnapEngage.setCallback(event, callback);
/* End of close chat window code */


The customized code snippet will look like the below:

<!-- begin SnapEngage code --> <script type="text/javascript"> (function() { var se = document.createElement('script'); se.type = 'text/javascript'; se.async = true; se.src = 'https://storage.googleapis.com/code.snapengage.com/js/XXXXXXXXXXXXXXXXX.js'; var done = false; se.onload = se.onreadystatechange = function() { if (!done&&(!this.readyState||this.readyState==='loaded'||this.readyState==='complete')) { done = true; /* Place your SnapEngage JS API code below */ /* SnapEngage.allowChatSound(true); Example JS API: Enable sounds for Visitors. */ /* Close chat window on end chat */ var event = SnapEngage.callbacks.CHAT_ENDED; function callback() { SnapEngage.endChat({ closeChatBox: true }); } SnapEngage.setCallback(event, callback); /* End of close chat window code */ } }; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(se, s); })(); </script> <!-- end SnapEngage code -->

Did you find this article helpful?

Not HelpfulNeeds WorkSo-soHelpfulVery Helpful (No Ratings Yet)
Loading ... Loading ...

Published October 30, 2020