We'll create fresh WordPress site with Before Exit Popup installed. You have 20 minutes to test the plugin after that site we'll be deleted.
Actually there is no way to find out when user will leave this site.
Before Exit Popup tries to get user attention back to site by showing a popup when the cursor is moved to browser control tab.
This plugin does not stop user from closing the browser or tab.