.your-modal-class with the modal's class.To create a modal pop-up on exit intent in Webflow, you will involve using custom code within your project settings. Here's a guide to implement it:
```javascript
(function() {
var exitIntentTriggered = false;
document.addEventListener('mouseleave', function(event) {
if (event.clientY < 0 && !exitIntentTriggered) {
exitIntentTriggered = true;
document.querySelector('.your-modal-class').style.display = 'block'; // Make sure to replace .your-modal-class with your modal's class
Webflow.require('ix2').init(); // This initializes the Webflow interactions
}
});
})();
```
.your-modal-class with the actual class name of your modal.
Implementing an exit intent modal involves styling your modal in Webflow and adding a JavaScript snippet to trigger the modal when a user attempts to exit the page. Make sure to test the functionality thoroughly to ensure it works as intended.