Click to launch chat

Hi @SYeung
Is the live chat link in your header created as a WordPress menu item? If so it probably won’t provide you with a field where you can add the necessary onclick code. What you can do is add a class to your menu item and then use Javascript/jQuery to add our desired onclick event to your menu link. For example:

$( ".menu-item" ).click(function() {
 window.HubSpotConversations.widget.open();
});

This jQuery code would probably be best placed in your WordPress header.php file.
If you need some further guidance send me a private message and I’ll see if I can help further.
Edit:
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