Tickets & Conversations

zogics
Participante

launching chat from a link

resolver

We would like to be able to launch the chat conversation from the click of a link. We have a couple of uses cases on our e-commerce site:

 

1) is the "Talk to an Expert" link on our product description pages like here:

https://zogics.com/gym-wipes/antibacterial-gym-wipes-z800-4-rolls-case

(located under quantity option and above add to cart button)

2) the "click here" text link after "Chat:"

3) In our footer - the live chat option 

 

We migrated our chat service from SnapEngage - and we used to use JavaScript to make this happen.

 

<a onclick="return SnapEngage.startLink();" href="javascript&colon;void(0);" title="Talk to an Expert">Talk To An Expert</a>

 

Does anyone know the equivalent on click link for the HubSpot chat? Or an alternative solution?

3 Solução aceitas
MFrankJohnson
Solução
Autoridade no assunto

launching chat from a link

resolver

Try this ...

<a id="click-to-chat__cta--text" class="cta cta--blue" style="margin-top: 20px;" onclick="window.hubspot.messages.EXPERIMENTAL_API.requestWidgetOpen();">Chat with Sales</a>

 

Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.

 

Hope that helps.

 

Be well,
Frank


www.mfrankjohnson.com

Exibir solução no post original

Solução
Anonymous
Não aplicável

launching chat from a link

resolver

No code required, just "Append #hs-chat-open to the end of your URL to trigger the chat widget launch."

 

Reference: https://knowledge.hubspot.com/articles/kcs_article/conversations/chat-with-your-website-visitors

 

🙂 

Exibir solução no post original

cquesadad
Solução
Participante

launching chat from a link

resolver

Perfect! I understod: here the complete solution that wordked for me:

 

<a id="click-to-chat__cta--text" class="cta cta--blue" style="margin-top: 20px;" onclick="window.HubSpotConversations.widget.open()" href="#hs-chat-open">Chat with Sales</a>

Exibir solução no post original

33 Respostas 33
MatthewShepherd
Conselheiro(a) de destaque

launching chat from a link

resolver

For anyone looking to not load their chat widget at all until a button is clicked (rather than popping open a chat widget that has already loaded as discussed above), take a look at this post: https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/onclick-action-doesn-t-work/m-p/457288#M...

Matthew Shepherd

Freelance HubSpot Consultant
CRM Consultant | SEO Specialist

Did my post help answer your query?Help the community by marking it as a solution.
pixii
Participante

launching chat from a link

resolver

@mediPr I had the same thing happen to buttons across my entire site, sometime in the last few weeks.

 

I found something that works.

 

Solution:

 

Where your code had:

onclick="window.hubspot.messages.EXPERIMENTAL_API.requestWidgetOpen();"

 

Replace with:

onclick="window.HubSpotConversations.widget.open();"

 

This should fix it.

mediPr
Participante

launching chat from a link

resolver

Hi, thanks so much. Excellent. This solved my issue!

sharonlicari
Gerente da Comunidade
Gerente da Comunidade

launching chat from a link

resolver

Thank you for sharing @pixii 


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




mediPr
Participante

launching chat from a link

resolver

I implemented this on my websites and it was working, but a recent update seems to have broken it on two independent website. Anyone experiencing the same? Any solutions? Thanks

0 Avaliação positiva
PamCotton
Gerente da Comunidade
Gerente da Comunidade

launching chat from a link

resolver

Hello @mediPr 

 

Would you be able to provide us more information about what is happening in your end?  The more information, screenshots, and details you can provide, the better I can advise on the next steps.

 

Thank you,

Pam

Você sabia que a Comunidade está disponível em outros idiomas?
Participe de conversas regionais, alterando suas configurações de idioma !


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




0 Avaliação positiva
MFrankJohnson
Solução
Autoridade no assunto

launching chat from a link

resolver

Try this ...

<a id="click-to-chat__cta--text" class="cta cta--blue" style="margin-top: 20px;" onclick="window.hubspot.messages.EXPERIMENTAL_API.requestWidgetOpen();">Chat with Sales</a>

 

Note: Please search for recent posts as HubSpot evolves to be the #1 CRM platform of choice world-wide.

 

Hope that helps.

 

Be well,
Frank


www.mfrankjohnson.com
WareWorks
Membro

launching chat from a link

resolver

Hi Frank

 

This is not working for me and generating a client side error, Any idea about this?

 

Uncaught TypeError: Cannot read property 'messages' of undefined
at HTMLAnchorElement.onclick ((index):503)

 

0 Avaliação positiva
MiaSrebrnjak
Gerente da Comunidade
Gerente da Comunidade

launching chat from a link

resolver

HI @WareWorks,

 

Welcome to the Community! It would be great if you can share which troubleshooting steps you have taken so far and include a screenshot of the error so the Community has more information to work with. 

 

Thanks

Mia 


Wusstest du, dass es auch eine DACH-Community gibt?
Nimm an regionalen Unterhaltungen teil, indem du deine Spracheinstellungen änderst


Did you know that the Community is available in other languages?
Join regional conversations by
changing your language settings

WareWorks
Membro

launching chat from a link

resolver

Hi Mia

 

I have resolved this issue. Thank you for your help. 

 

WW

MiaSrebrnjak
Gerente da Comunidade
Gerente da Comunidade

launching chat from a link

resolver

Thank you @WareWorks, I'm glad you were able to find a solution!

 

Have a great rest of your day

Mia 


Wusstest du, dass es auch eine DACH-Community gibt?
Nimm an regionalen Unterhaltungen teil, indem du deine Spracheinstellungen änderst


Did you know that the Community is available in other languages?
Join regional conversations by
changing your language settings

RZhang
Membro

launching chat from a link

resolver

Hi  i have tried it, but i dont work.
is there anything wrong??

https://campaign.innovatingautomation.asia/test 

 

0 Avaliação positiva
PamCotton
Gerente da Comunidade
Gerente da Comunidade

launching chat from a link

resolver

Hello @RZhang could you please provide us more details in what was changed on your end? 

 

Thank you,

Pam

Você sabia que a Comunidade está disponível em outros idiomas?
Participe de conversas regionais, alterando suas configurações de idioma !


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !




RZhang
Membro

launching chat from a link

resolver

Hi Pam,

I want to realize the effect like that:

When I click a button, the chat box come out in a new tab. Please check the attachment.

https://community.hubspot.com/t5/Tickets-Conversations/launching-chat-from-a-link/td-p/252778


Best Regards

0 Avaliação positiva
soumlabs
Colaborador(a)

launching chat from a link

resolver

Hey but where do i put this piece of code? I'm no programmer. Also, i see their website they have moved the chat widget to middle of the pages. How to do it?

0 Avaliação positiva
Solução
Anonymous
Não aplicável

launching chat from a link

resolver

No code required, just "Append #hs-chat-open to the end of your URL to trigger the chat widget launch."

 

Reference: https://knowledge.hubspot.com/articles/kcs_article/conversations/chat-with-your-website-visitors

 

🙂 

CAmmann
Participante

launching chat from a link

resolver

That works, however, with the delay set. Does anyone know how the chat window will open immediately?

0 Avaliação positiva
kvlschaefer
Gerente da Comunidade
Gerente da Comunidade

launching chat from a link

resolver

Hi @CAmmann,

 

Thanks for reaching out! 

 

This thread is 4 years old and may not have full visibility among our Community Members.

 

To ensure that your question is seen by our community members, I would encourage you to create a new post on the Community.

 

Please make sure to include a full description of the issue you are running into or your goal and any pertinent screenshots in the new post for the Community to better assist with the next steps. Thank you! 

 

Best,

Kristen


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Avaliação positiva
cquesadad
Solução
Participante

launching chat from a link

resolver

Perfect! I understod: here the complete solution that wordked for me:

 

<a id="click-to-chat__cta--text" class="cta cta--blue" style="margin-top: 20px;" onclick="window.HubSpotConversations.widget.open()" href="#hs-chat-open">Chat with Sales</a>
kvlschaefer
Gerente da Comunidade
Gerente da Comunidade

launching chat from a link

resolver

Thanks for sharing, @cquesadad


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !