APIs & Integrations

LukaszWiktor
Participante

How to identify a contact in the chat?

resolver

Hi,

how can I identify a visitor in the chat box? I've tried the identify API

 var _hsq = window._hsq = window._hsq || []; 
_hsq.push(["identify", { email: "${email}" }]);

but it didn't work. New chat conversations still appear as "Uknown Visitor"

I'd appreciate your help.

Thanks,
Lukasz

1 Soluciones aceptada
tilly
Solución
Equipo de producto de HubSpot
Equipo de producto de HubSpot

How to identify a contact in the chat?

resolver

The Visitor Identification API is now in public beta! You can read more about it and get started here. This is open to all Pro+ portals as of now, no need to be ungated. 

 

The new Visitor Identification API enables you to provide details about visitors' identities to the chat widget after they've been authenticated by an external login system. So, if a visitor logs in (by providing their email address), the Visitor Identification API can send their identity to HubSpot's chat widget.

 

This API also works automatically with HubSpot's private content membership for CMS Hub or Knowledge Base, no additional setup required!

 

Please let me know if you have any questions or feedback. This API is still in beta, by using this API you agree to our developer beta terms.

Ver la solución en mensaje original publicado

116 Respuestas 116
edutechno
Participante

How to identify a contact in the chat?

resolver

The API to identify a visitor already exists (https://developers.hubspot.com/docs/api/events/tracking-code), but it dont work as expected with chat.

I'm not sure to understand why this bug will be fixed only for Pro+ subcriptions.

sontek
Miembro

How to identify a contact in the chat?

resolver

Why is this limited to Pro+ only subscriptions?    This seems more like a bug fix than a feature to me as a consumer of the product.   I have embedded live chat on my site but cannot track who that person is when they reach out even if I know who they are.

taiwan99
Participante

How to identify a contact in the chat?

resolver

I think so too, this is a bug fix, why do I need a Pro subscription

0 Me gusta
Yonbelauste
Participante

How to identify a contact in the chat?

resolver

Could you give me access to the form? yon@ipos.mx

 

Thanks!

0 Me gusta
cdewey22
Equipo de producto de HubSpot
Equipo de producto de HubSpot

How to identify a contact in the chat?

resolver

sorry about that! We just updated the permission, if you try again you should be able to access it. 

 

Thank you!

0 Me gusta
prafful54
Miembro

How to identify a contact in the chat?

resolver

Hey in the form.. do we need to enter details of a specific customer? also what is hubID.. is it the contact id?

0 Me gusta
cdewey22
Equipo de producto de HubSpot
Equipo de producto de HubSpot

How to identify a contact in the chat?

resolver

@prafful54 sorry that is your portal number. You can find that in the URL. If you can't find it you can leave it blank and we can find it on our end. I will update the form to be a bit more clear. 

Thanks!

0 Me gusta
sontek
Miembro

How to identify a contact in the chat?

resolver

We just implemented live chat on our site and want to make sure we identify the people using the live chat.   Please send me the beta

 

I tried the widget refresh code and it does not work.

vitorkoddex
Participante

How to identify a contact in the chat?

resolver

Could you give me access to the form? vitorhpereira@gmail.com

 

Thanks!

0 Me gusta
Stanz
Participante

How to identify a contact in the chat?

resolver

Commenting here to get updates on this feature. It's a beautiful feature that we'd like to implement as soon as it's done. 

Yonbelauste
Participante

How to identify a contact in the chat?

resolver

Hi @cdewey22 ,

Is there any news on this feature?

 

Thanks,

Yon

breslinv
Participante

How to identify a contact in the chat?

resolver

We are also having issues with this and are using Segment. Are there any solutions? Surely this is a critical requirement?

0 Me gusta
cbarley
Exmiembro de HubSpot
Exmiembro de HubSpot

How to identify a contact in the chat?

resolver

Hey all, we recently came out with a Conversations JavaScript API, where you wouldn't have to refresh the page. This is great for SPAs because now you can just refresh the widget and not the page itself. After some quick testing on a page of my own, I was able to identify the contact, refresh the widget programmatically, then have the ability to see the contact's email address within the Conversations tool. 

screenshot: http://prntscr.com/nvwptt

We still can't use personalization tokens inside the chat unless you're using bots, but now the contacts you identify won't show up as "Anonymous Visitor". Here's the code I used:

function onConversationsAPIReady() {
    var _hsq = window._hsq = window._hsq || [];
    console.log("ready")
    _hsq.push(["identify",{
    	email: "test@testing.com"
}]); _hsq.push(['trackPageView']); setTimeout( () => { console.log("refresh") window.HubSpotConversations.widget.refresh(); }, 1000) } function sendIdentify(){ if (window.HubSpotConversations) { onConversationsAPIReady(); } else { window.hsConversationsOnReady = [onConversationsAPIReady]; }

feel free to keep testing, but just wanted to make sure you were aware of this new JS API we have.

 

tbrito85
Participante

How to identify a contact in the chat?

resolver

Hello @cbarley. Can you send us the HTML example page working identifying a visitor by email?

 

We are using your example code snippet but didn´t work.

 

0 Me gusta
cbarley10
Colaborador

How to identify a contact in the chat?

resolver
0 Me gusta
IsaacTakushi
HubSpot Employee
HubSpot Employee

How to identify a contact in the chat?

resolver

Hi, all.

 

If you've implemented theidentifytrackPageView, and HubSpotConversations.widget.refresh() methods @cbarley10 outlines but are still seeing some chats come in as "Unknown Visitors," I can confirm that it is currently expected behavior.

 

Theidentify method critical to the approach HubSpot Developer Support  has heretofore positioned on the Community only directly updates the hubspotutk cookie with the visitor's identity.

 

The conversations (live chat) tool uses a different cookie — messagesUtk— to populate visitor names. If this cookie is not associated with any identity information, a chat will come in under an "Unknown Visitor."

 

HubSpot currently has a back end process which associates the hubspotutk identity information with themessagesUtk cookie, but calling theidentifymethod does not always trigger this process.

 

As such, there is currently no way to guarantee that a chat won't come in under an "Unknown Visitor," even with the method outlined above, which works much of the time.

Our team is working on a dedicated solution for this use case but we currently can't offer a concrete timeframe. Please subscribe to the API Changelog to be notified of the update when it is released.

Apologies for the confusion and thank you in advance for your understanding.

 

Isaac Takushi

Associate Certification Manager
camicase82
Participante

How to identify a contact in the chat?

resolver

Hi Isac, im currently evaluating hubSpot and reading the current thread, but I'm not 100% sure I'm getting the issue, in my case I need to identify 100% a user chatting, my site is built with angular and people logs in using Facebook and some simple data, but I need to guarantee that every time a logged user types in a chat, the operator knows exactly who the person is, and on which part of the web site the person is located

IsaacTakushi
HubSpot Employee
HubSpot Employee

How to identify a contact in the chat?

resolver

Hi, all (especially @sp3@finn, and @camicase82).

 

Apologies for the delayed response.

 

We hear you and recognize how critical it is to reliably identify visitors in chats.

 

@cdewey22 and her team still view this feature as a priority and are aiming to release some functionality in beta in the next handful of weeks. Please stay tuned to this thread and the platform changelog for updates.

 

In the meantime, the admittedly imperfect workaround I've outlined above is the next best approach.

Isaac Takushi

Associate Certification Manager
camicase82
Participante

How to identify a contact in the chat?

resolver

Thanks a lot for your response, in the meantime I think we'll be using Tawk for the chat part, and HubSpot to manage sales process

0 Me gusta
jmorgan
Participante

How to identify a contact in the chat?

resolver

Hi Camicase,

 

I don't recommend you use hubspot then. We have been waiting for this to be fixed for months now. With no real update. If you use case is as you describe you can't use Hubspot as it does not work. 

 

Cheers,

 

Jonathan

camicase82
Participante

How to identify a contact in the chat?

resolver

Hey Jonathan, thanks a lot for your message, any ideas on how to move forward? I'm currently trying tawk.to and have managed to get some stuff working but it just chat, what about using the js api for HubSpot to handle page events and sales process and a third party chat? or would be better to look for something like FreshSales

0 Me gusta