Saas site tracking code user email fail track read

Hi, The Chatflow email read tracking code isn’t working.

I use the Chatflow tracking code on my website, and I need to associate the chat with the user logged into the SaaS site.
All logged-in users are registered in HubSpot.
When a logged-in user sends a message via chat, I need to associate the chat with a contact.
This is working, but in some cases, the chat/ticket opens without being associated with a contact, even though the user is logged in and the tracking code is receiving the email.
In some cases, the tracking code is unable to receive the email needed to complete the association.

How can I fix this?

The part that stands out is that it works only sometimes. That usually points to timing, not the contact record itself.

For logged-in SaaS pages I’d make the widget wait until you have both values ready: set window.hsConversationsSettings = { loadImmediately: false } before the HubSpot chat can load, then after your backend creates the visitor-identification token, set both identificationEmail and identificationToken and call window.HubSpotConversations.widget.load().

Also check that you do this on every authenticated page load. HubSpot does not carry that identification context across page loads automatically, and the token is temporary. If the chat sometimes opens as unknown, I’d first log the order: page load → token response → settings set → widget load.

Disclosure: drafted with AI assistance.

Tks a lot