Web Message Exit Intent
Learn how Web Message Exit Intent detection works on different devices.
For Desktop Devices
Mouse Movement Detection
How it works:
- We track where the mouse cursor moves on the page.
- When the mouse moves to the very top of the browser window (within 15 pixels), it indicates the user is about to close the tab or window.
- We can show a message or offer before they leave.
Why this works:
- When users want to close a tab, they typically move their mouse to the top where the close button (X) is located
- The browser's address bar, tabs, and close buttons are all at the top
- Moving the mouse to the top is a strong indicator of exit intent
Technical Details:
- Monitors mouse position continuously
- Triggers when mouse Y-coordinate is ≤ 15 pixels from the top of the viewport
- Very reliable on desktop devices with mouse/trackpad
For Mobile Devices
Back Button Detection
How it works:
- When a visitor arrives from another site (e.g., Google, Facebook), we prepare the back button.
- If they tap the browser back button, we treat it as exit intent.
- We can show a message or offer before they leave.
Technical Details:
- Uses the browser's History API to detect back button presses
- Works by adding a state to browser history and listening for
popstateevents - Only activates when user arrives from an external site (not from same domain)
Scroll-Up Detection
How it works:
- We track how far they've scrolled down the page.
- If they scroll down, then quickly scroll back to the top (0% scroll position), it may indicate they're about to leave.
- We can show a message or offer.
Technical Details:
- Monitors scroll position continuously
- Detects when user scrolls from a position > 0% back to 0% (top of page)
- This upward scroll gesture often indicates intent to leave
Common Method: Tab Switch Detection
Applies to: Both Desktop and Mobile
How it works:
- We detect when the user switches away from the current browser tab or window.
- On desktop: When they switch to another tab or minimize the browser.
- On mobile: When they switch to another app, go to home screen, or switch to another browser tab.
- We can show a message or offer when they're about to leave.
Technical Details:
- Uses the browser's
visibilitychangeevent - Fires when the page becomes hidden (user switches away)
- Works across all modern browsers on both desktop and mobile
Updated about 4 hours ago
