Launch Bot On Exit Intent

Abby Updated by Abby

Here's how to launch a Popup or Livechat bot when the user is trying to leave the page:

We'll insert the following script after our embed script and before the end of the script tag:

function onMouseOut(event) {

// If the mouse is near the top of the window, open the bot

if (event.clientY < 50) {

// Remove this event listener

document.removeEventListener("mouseout", onMouseOut);

 // Open the bot

myLandbot.open();

}

}

document.addEventListener("mouseout", onMouseOut);

How did we do?

Load script and display bot on click button

Display Bot During Business Hours Only (Livechat & Popup)

Contact