Hi everyone, i am trying to integrate hubspot chat with javascript code, and i am having a problem.
Theese are may steps:
1. loading the chat with the method:
window.HubSpotConversations.widget.load()
2. Passing email and token of the authenticated user in the settings:
window.hsConversationsSettings = {
loadImmediately: false,
identification Email: myEmail,
identificationToken: myToken,
};
3. After a conversation, when the user logout I perform these cleaning operations:
window.HubSpotConversations.clear();
window.HubSpotConversations.widget.remove();
4. Now, if another user with different email and token login, the previous conversation remains and when the message is sent I find the previous user in the inbox.
Am I doing something wrong? how can I solve this problem?
Thanks,
GC5