Leave website popup?

Is there a way to show popup when people try to leave the site (close the tab or window)? So far I found “mouse leave window” interaction, but that launches way too fast. It’s pretty easy to leave window, without intention to leave the website.

Not a direct answer but this is one of the options available in our BricksExtras’ Modal element.

On page exit intent – Once the user attempts to exit the page by moving the cursor or clicking away from page, the modal will show. This will only happen once, if they close and then try to leave again it won’t show.

@Sridhar do you have any tricks to have this exit modal work on a mobile device?