How to launch a Landbot by clicking a button

Here below you can find the code you need to trigger and open your landbot, embedded as a LiveChat or Pop up mode, by clicking a button.

<html> 
<body>
<button onclick="myLandbot.open()">Open bot</button>
<script src="https://static.landbot.io/landbot-widget/landbot-widget-1.0.0.js">
</script>
<script>
var myLandbot = new LandbotLivechat({
index: 'your bot url'
});
</script>
</body>
</html>

Below is an example of how to do it:


How did we do?


Powered by HelpDocs

Powered by HelpDocs