You can enable this event in the “Settings” – “Visitors data tracking” – “Auto tracking” section. There, you’ll need to tick the "Record Tried to leave the website" option and save the settings. The “Tried to leave the website” event will be recorded in your visitors’ lead cards every time the mouse cursor of their device leaves the borders of your website.
Then you can go to the “Triggered messages” section and create a new triggered message with the "Tried to leave the website" event as its trigger. The “Tried to leave the website” event can be used to send triggered messages to your visitors when they’re trying to leave your website.