Tickets & Conversations

zogics
Participant

launching chat from a link

Résolue

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 Solutions acceptées
MFrankJohnson
Solution
Leader d'opinion

launching chat from a link

Résolue

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

Voir la solution dans l'envoi d'origine

Solution
Anonymous
Non applicable

launching chat from a link

Résolue

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

 

🙂 

Voir la solution dans l'envoi d'origine

cquesadad
Solution
Participant

launching chat from a link

Résolue

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>

Voir la solution dans l'envoi d'origine

33 Réponses
MatthewShepherd
Conseiller clé

launching chat from a link

Résolue

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
Participant

launching chat from a link

Résolue

@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
Participant

launching chat from a link

Résolue

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

sharonlicari
Gestionnaire de communauté
Gestionnaire de communauté

launching chat from a link

Résolue

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
Participant

launching chat from a link

Résolue

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 Votes
PamCotton
Gestionnaire de communauté
Gestionnaire de communauté

launching chat from a link

Résolue

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 Votes
MFrankJohnson
Solution
Leader d'opinion

launching chat from a link

Résolue

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
Membre

launching chat from a link

Résolue

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 Votes
MiaSrebrnjak
Gestionnaire de communauté
Gestionnaire de communauté

launching chat from a link

Résolue

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
Membre

launching chat from a link

Résolue

Hi Mia

 

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

 

WW

MiaSrebrnjak
Gestionnaire de communauté
Gestionnaire de communauté

launching chat from a link

Résolue

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
Membre

launching chat from a link

Résolue

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

https://campaign.innovatingautomation.asia/test 

 

0 Votes
PamCotton
Gestionnaire de communauté
Gestionnaire de communauté

launching chat from a link

Résolue

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
Membre

launching chat from a link

Résolue

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 Votes
soumlabs
Contributeur

launching chat from a link

Résolue

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 Votes
Solution
Anonymous
Non applicable

launching chat from a link

Résolue

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
Participant

launching chat from a link

Résolue

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

0 Votes
kvlschaefer
Gestionnaire de communauté
Gestionnaire de communauté

launching chat from a link

Résolue

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 Votes
cquesadad
Solution
Participant

launching chat from a link

Résolue

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
Gestionnaire de communauté
Gestionnaire de communauté

launching chat from a link

Résolue

Thanks for sharing, @cquesadad


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