Hi.
I have the Live Chat icon down the bottom and works perfectly.
On my Contact Page, I have created another icon on the page and I was wondering what is the link I can use to launch the Live Chat?
Hi.
I have the Live Chat icon down the bottom and works perfectly.
On my Contact Page, I have created another icon on the page and I was wondering what is the link I can use to launch the Live Chat?
Hey @Handemmet you should append your link with the following:
<a class="cta-primary" href="" onclick="window.hubspot.messages.EXPERIMENTAL_API.requestWidgetOpen();">Link text</a>
This is taken from this earlier post. Hope this helps!
Thanks, that worked perfectly!
@Bryantworks I am attempting this same implementation but not having any luck. Here’s the code I’m using inside of a module:
<a class="cta_button" onclick="window.hubspot.messages.EXPERIMENTAL_API.requestWidgetOpen();">{{ module.cta_two.button_text }}</a>
The “Start a Live Chat” button on this contact page doesn’t appear to pop open the chat window. I also remember an href target of “#hs-chat-open” as another solution but I don’t see that working either.
Any additional help you can offer?
@brianserocke the conversations method code changed slightly, so try this as your onclick
onclick="window.HubSpotConversations.widget.open();
p.s. For anyone looking to not load their chat widget at all until a button is clicked the above isn’t what you need. Take a look at this post: https://community.hubspot.com/t5/Tips-Tricks-Best-Practices/onclick-action-doesn-t-work/m-p/457288#M472
Thanks for the clarification, @MatthewShepherd! We implemented this on our Contact page and it appears to be working well. I appreciate you giving us the heads up.