APIs & Integrations

LukaszWiktor
参加者

How to identify a contact in the chat?

解決

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件の承認済みベストアンサー
tilly
解決策
HubSpot製品開発チーム
HubSpot製品開発チーム

How to identify a contact in the chat?

解決

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.

元の投稿で解決策を見る

116件の返信
Dexter_Chen
メンバー

How to identify a contact in the chat?

解決

@Derek_Gervais I'm using Forms API to submit hubspotutk along with contact name/email/ip upon login, yet I still need to refresh for the contact to be recognized by the bot.

When the user was just logged in for the first time, it's still considered an unknown visitor by the bot, and simply one more refresh would solve the issue. It has nothing to do with timing, I tried dynamically loading the script 10 seconds after the page was fully loaded upon login but I still had to refresh one more time to have the bot recognize the contact.

適用対象外

How to identify a contact in the chat?

解決

Any updates on this?

My problem is that I need to re-identify my users upon logout / another login, but it seems that the first identify is stucked, and when the chat widget opens, the previous history shows up, and the messages goes in the name (email) of the first identified user no matter if I call again the window._hsq.push([ "identify", { email: .. } ]). What is the proper way to re-identify the chat so I could handle my single page app logout/login process?

6CMarketing
参加者

How to identify a contact in the chat?

解決

Hello, we have the exact same issue. We want to identify the conversations, but instead we only get "Unknown Visitor".

Any solution for this ?

0 いいね!
Vinicius_Pavei
メンバー

How to identify a contact in the chat?

解決

Did you find any solution?

0 いいね!
Dimo_Boyadzhiev
メンバー

How to identify a contact in the chat?

解決

No,
it is not possible.

The chat and analytics are two different systems and they don't communicate each other.

I had to use another chat provider :frowning:

Vinicius_Pavei
メンバー

How to identify a contact in the chat?

解決

Hi!

Could you tell me which chat provider you use?

0 いいね!
Dimo_Boyadzhiev
メンバー

How to identify a contact in the chat?

解決

Hi
I have the same issue

<!-- Set up the path for the initial page view -->
<script>
    var _hsq = window._hsq = window._hsq || [];
    _hsq.push(["identify",{
        email: '{{ app.user.email }}',
        id: '{{ app.user.id }}'
    }])
    _hsq.push(["trackPageView"]);
</script>

<!-- Start of HubSpot Embed Code -->
<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/portal_id.js"></script>
<!-- End of HubSpot Embed Code -->
0 いいね!
適用対象外

How to identify a contact in the chat?

解決

Hiii
I have same issue but after refreshing it's identified in chat conversation. I have SPA in Angular 5. Any other solution for Why should i have to refresh.??

0 いいね!
Derek_Gervais
元HubSpot社員
元HubSpot社員

How to identify a contact in the chat?

解決

Hi @LukaszWiktor,

Is this true even after a page refresh? My gut tells me that the contact identification is working, but the messages client isn't being updated with the identity info. Can you try making the association, then refreshing?

0 いいね!
Derek_Gervais
元HubSpot社員
元HubSpot社員

How to identify a contact in the chat?

解決

Hi @LukaszWiktor and @Romusc,

The "identify" method of the Tracking Code API only stores the identity information in the tracker; you'll need to call the "trackEvent" or "trackPageView" method to actually pass the identity info to HubSpot. Are you both subsequently calling one of these events?

0 いいね!
LukaszWiktor
参加者

How to identify a contact in the chat?

解決

Hi @Derek_Gervais,

Thanks for the hint! I was only calling identify. Now, I added trackPageView right below but it still didn't help. My code snippet looks like this:

<script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/1234567.js"></script>
<script>
    var _hsq = window._hsq = window._hsq || [];
    _hsq.push(["identify",{
         email: "user@example.com",
    }]);
    _hsq.push(["trackPageView"]);
</script>

I have this user already in my Contacts but when they start a chat conversation then it shows up as "Unknown Visitor" :frowning:

Romusc
メンバー

How to identify a contact in the chat?

解決

Hi Lukasz,

I am having the exact same issue.
I'm interested if you found a solution !

Thanks,
Romu