APIs & Integrations

LukaszWiktor
Participant

How to identify a contact in the chat?

SOLVE

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 Accepted solution
tilly
Solution
HubSpot Product Team
HubSpot Product Team

How to identify a contact in the chat?

SOLVE

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.

View solution in original post

sontek
Member

How to identify a contact in the chat?

SOLVE

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
Participant

How to identify a contact in the chat?

SOLVE

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

0 Upvotes
Yonbelauste
Participant

How to identify a contact in the chat?

SOLVE

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

 

Thanks!

0 Upvotes
cdewey22
HubSpot Product Team
HubSpot Product Team

How to identify a contact in the chat?

SOLVE

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

 

Thank you!

0 Upvotes
prafful54
Member

How to identify a contact in the chat?

SOLVE

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

0 Upvotes
cdewey22
HubSpot Product Team
HubSpot Product Team

How to identify a contact in the chat?

SOLVE

@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 Upvotes
sontek
Member

How to identify a contact in the chat?

SOLVE

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
Participant

How to identify a contact in the chat?

SOLVE

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

 

Thanks!

0 Upvotes
Stanz
Participant

How to identify a contact in the chat?

SOLVE

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
Participant

How to identify a contact in the chat?

SOLVE

Hi @cdewey22 ,

Is there any news on this feature?

 

Thanks,

Yon

breslinv
Participant

How to identify a contact in the chat?

SOLVE

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

0 Upvotes
cbarley
HubSpot Alumni
HubSpot Alumni

How to identify a contact in the chat?

SOLVE

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
Participant

How to identify a contact in the chat?

SOLVE

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 Upvotes
cbarley10
Contributor

How to identify a contact in the chat?

SOLVE
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

How to identify a contact in the chat?

SOLVE

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
Participant

How to identify a contact in the chat?

SOLVE

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?

SOLVE

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
Participant

How to identify a contact in the chat?

SOLVE

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 Upvotes
jmorgan
Participant

How to identify a contact in the chat?

SOLVE

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
Participant

How to identify a contact in the chat?

SOLVE

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 Upvotes
avichopra
Contributor | Partner
Contributor | Partner

How to identify a contact in the chat?

SOLVE

Is there an update on the solution for this? We have been waiting for this for really long time now.