Reset SalesIQ Widget from ready event
Hi,
we have a Problem with the JavaScript API for the SalesIQ Chat Widget. We want to make sure that the SalesIQ visitor information in the chat are not displayed after logout. In our application logout is possible through other means than just a button click. For example, the user needs to reauthenticate after a day, if he hasn't ticked "stay logged in". A reload of a page will thus delete authentication cookies and load the page as if he wasn't logged in. This and other means make it rather impossible to bind the SalesIQ reset to a specific JS event. So I thought I would just put the "$zoho.salesiq.reset()" call in the "$zoho.slaesiq.ready(function(){...});" event. However it seems that reset can only be called, when the Iframe was completely loaded (and a few things instantiated). But there is no event that specfies when this happens. So either I need a dirty hack with "iframe.onload" or something like "setTImeout". With both it's basically just luck if the visitor is deleted or not. I don't like the idea of someone logging into our system in a public space only to find that the next user now has his email even though he logged out.
Is there any way to reliably delete the visitor data from the ready event? Or is there an event that notfies us about the Iframe being totally loaded and reset can be called? Even better would be a way to delete the visitor cookies from PHP, but I guess they are set within the context of the ZOHO domain, making this impossible.
Thanks