Trigger live chat with JS hooks

I was wondering if it is possible to hide the livechat until triggered with some Javascript (i.e. with a text link or button in the content)?

We would like to encourage people to use the chat instead of a contact form, so adding a trigger in the content beforehand would be great.


Hi @mikestreety,
We have a page in our Developer Documentation that talks about Leadbooster live chat and triggers here. Is this what you are looking for? :slightly_smiling_face:

Thanks Nicole, looks like that might do the trick - will get back to you if I have any issues!

1 Like

Hi @Nicole_Tan , is it possible to hide the live chat on page load?

Hi @joaoaugusto,

From what I understand (i.e. LeadBooster Browser API guide), you should be able to hide the live chat based on the trigger you set?

Have you tried it? Do you have any issues with it? Please do let us know if you’re experiencing any problems!

Thanks @Nicole_Tan
I meant to hide the live chat completely, no icon or anything on page load. Sorry if I wasn’t clear!

I found the following rule on this forum, to hide the element
document.getElementById('LeadboosterContainer').setAttribute('style', 'display:none !important');

It works, however after a couple seconds the proactiveChat class is added to the element and the widget pops up again. We want to have it completely hidden on the page until the user click a button and trigger('open') is fired - by the way, we got the trigger working just fine.

Thank you!

Hi @joaoaugusto,

I’ve checked with our developers and unfortunately, this is not possible right now. According to them, every solution at the moment will be very hacky on the user’s side.

The trigger to open the bot isn’t meant for displaying it but only for opening the chat itself. They have currently taken your question as a product request.