Hi there,
I am currently working on integrating Hubspot LiveChat into a SPA React web application. At the moment we are experiencing issues with identifying multiple users across multiple sessions.
The issue I have, is that once I include the Hubspot JS, it records the first captured e-mail address as the identity of the end user, with no way of updating.
There are two scenarios that I have come across:
Tracking of non-hubspot forms enabled
1. Enable track non-hubspot forms
2. Include Hubspot js on our index.html
3. Visit the website (which redirects the user to a login form)
4. Attempt to sign in as admin@domain.io with an invalid password
5. Attempt to sign in as user@domain.io with a valid password
6. Open Hubspot chat - within Hubspot, the support agent would see my identity as admin@domain.io, even though I was signed in as user@domain.io.
Tracking of non-hubspot forms disabled
1. Include Hubspot js on our index.html
2. Visit the website (which redirects the user to a login form)
3. Attempt to sign in as user1@domain.io with a valid password
4. On successful sign in, we identify the visitor using:
__hsq.push(["identify", { email: 'user1@domain.io' }])
Hubspot docs - Identify a visitor
5. Sign out
6. Sign in as user2@domain.io with a valid password
7. Repeat step 4 with email as user2@domain.io
8. Open Hubspot Chat - the support agent sees my identity as user1@domain.io
The only way I have found to get around these issues, is to clear the Hubspot cookies / local storage on every logout.
If anyone has any tips or guidance for a better approach to these issues, please post a reply
Thanks
Michael