Open LiveChat bot as soon as page loads (3 ways)

Maybe we want to display the LiveChat as soon as the page is loaded to greet customers, here are three ways to do it:

Display bot Always and As Soon As the page is loaded

<script> 
myLandbot.on('landbot-load', () => {
myLandbot.open()
})
</script>

Display bot Always and 3 seconds after the page is loaded

<script> 
myLandbot.on('landbot-load', () => {
setTimeout(function(){
myLandbot.open()
},3000)
})
</script>

Display bot only to new visitors and 3 seconds after the page is loaded

<script> 
myLandbot.on('landbot-load', () => {
var visitor = localStorage.getItem('firstvisit')
if (visitor != 'true'){
localStorage.setItem('firstvisit', 'true');
myLandbot.open() } })
</script>

We will always locate the code right after the one we used to embed our bot:


How did we do?