We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Feb 3, 2019 6:45 PM
Hi there,
I'm a front-end developer on a mid-sized SaaS product. Our sales teams use Hubspot, and we'd like to use Hubspot Live Chat to provide support to our logged-in users.
I've added the hubspot tracking code to our product, and the live chat widget is appearing as intended; however, although I've followed the documentation for identifying a visitor using the Tracking Code API, in our testing, users in live chat still show up as "Unidentified Visitor" unless they manually identify themselves via the in-chat email capture form, or unless the support agent manually links the user to the appropriate contact. I can't find any documentation on this issue, only conflicting information in the developer forum as to whether this is even a capability supported by Hubspot.
Would a Hubspot team member please confirm: Does Live Chat have the capability to automatically link chat users to their contact in Hubspot via the Tracking Code API?
Feb 3, 2019 6:50 PM
To provide a little more context:
Our product is a Single Page App.
I've identified the user via the tracking code API, and manually triggered a "trackPageView " event. I've confirmed via the browser developer tools that the user email is being sent to Hubspot, and there is a Hubspot contact for the email address being sent.
Feb 3, 2019 11:26 PM
Hey there,
I've come across the same issue as yourself when integrating with a SPA React app. We set the following information on login, and was continuing to see "Unidentified visitor" within Hubspot.
window._hsq.push(['identify', { email }]) window._hsq.push(['trackPageView'])
The only way I could find to get around this is to force a full page refresh after identifying the user.
Feb 4, 2019 5:35 PM
Hey, thanks for replying 🙂
So you can confirm that is supported, then? Good to know.
I've read about the refresh thing on another thread; when I tried it the other day, I wasn't able to replicate that manually refreshing the page.
Would love to know if anyone has a solution that doesn't involve forcing an unnecessary full page refresh.