Listeners / Events
Listeners / Events
Fully loading Tidio Chat
(function () {
function onTidioChatApiReady() {
// Code after chat loaded
}
if (window.tidioChatApi) {
window.tidioChatApi.on('ready', onTidioChatApiReady);
} else {
document.addEventListener('tidioChat-ready', onTidioChatApiReady);
}
})();
This function triggers only when Tidio Chat is fully loaded. Once it's up, you'll be able to use the methods below.
Other events
Widget have other events using which you can subscribe with a listener.
The events are as follows: setStatus
, messageFromOperator
, messageFromVisitor
, conversationStart
, preFormFilled
, resize
, open
, close
.
conversationStart
will trigger on the first message from visitor which wasn't handled by an automation. Event can trigger again for the same visitor if his/her last message is older than 1 day.
Updated about 2 months ago