How Exit Intent Popups Work
An exit intent popup fires when the cursor heads for the browser's tabs or close button. That gesture only exists on desktop. Here is how detection works, what replaces it on phones, and which offers suit the moment.
Some links on this page are affiliate links: if you buy through one, we may earn a commission at no extra cost to you. It does not change what we recommend; see the editorial policy.
An exit intent popup fires when the mouse leaves the page towards the top of the window — the gesture people make when heading for the tab bar, address bar or close button. It is a desktop signal. On phones there is no cursor, so "exit intent" on mobile is a set of weaker substitutes, and treating them as equivalent is where most exit popups go wrong.
How desktop detection works
The browser fires a mouseout event on the document when the pointer leaves an element. When it leaves the whole page, the event's relatedTarget is null — there is no element it moved onto. Combine that with a vertical position at or above the top edge, and you have the cursor heading for the browser chrome.
A minimal illustrative version:
(function () {
var KEY = 'exitPopupShown';
function alreadyShown() {
try { return localStorage.getItem(KEY) === '1'; } catch (e) { return false; }
}
if (alreadyShown()) return;
function showPopup() {
var dialog = document.getElementById('exit-offer');
if (!dialog || alreadyShown()) return;
dialog.showModal();
try { localStorage.setItem(KEY, '1'); } catch (e) {}
document.removeEventListener('mouseout', onMouseOut);
}
function onMouseOut(event) {
// Pointer left the document (no relatedTarget) through the top edge
if (!event.relatedTarget && event.clientY <= 0) {
showPopup();
}
}
// Ignore the first few seconds: early mouse movement is not intent
setTimeout(function () {
document.addEventListener('mouseout', onMouseOut);
}, 5000);
})();
It expects a <dialog id="exit-offer"> in the page — accessible markup for one is in popup examples.
It is deliberately small. Production tools add a sensitivity margin (firing a few pixels before the edge), a minimum time on page, and a check that the visitor has not already converted. The delay matters: without it, a visitor who moves the mouse up to scroll or reach the bookmarks bar in the first second sees an offer before reading a word.
Note the false positives that remain. Reaching for another tab, the address bar or a browser extension all look identical to leaving. That is acceptable for a once-per-visitor prompt and not acceptable for anything shown repeatedly.
Why it does not exist on touch
A touch screen has no hover state and no pointer that travels anywhere between taps. There is nothing to detect. What mobile tools use instead:
| Signal | What it detects | Weakness |
|---|---|---|
| Fast scroll back up | Reader heading for the address bar | Also fires on people re-reading a section |
| Inactivity | Reader stopped interacting | Also fires on slow readers |
Tab or app switch (visibilitychange) |
Page left the foreground | Fires after the visitor has gone; shows only if they come back |
| Back button interception | Attempt to navigate back | Manipulating history is hostile and widely disliked — avoid it |
None is as precise as the desktop gesture. Use one, set it conservatively, and accept that the mobile version will convert worse. Never let the "mobile fallback" degrade into a timer that fires on arrival — that is exactly the overlay the interstitial rule targets.
The interstitial rule on mobile
Google's guidance on intrusive interstitials warns that overlays covering the main content on mobile make pages harder to use and can hurt search performance. An exit popup is the low-risk case, because it appears after the visitor has read the page. The risk is configuration: an aggressive mobile trigger, a timer of a few seconds, or a fullscreen takeover on small screens. On phones, prefer a slide-in or a bar over a fullscreen modal. The full treatment is in choosing a popup plugin and the WordPress SEO checklist.
Offers that fit the exit moment
The visitor has decided to leave. Asking them to do something big now fails. Offers that work:
- Something to take with them — the checklist or template version of the page they were reading. The most natural fit; ideas are in lead magnet ideas.
- A reason to come back — a weekly digest of the topic, not "our newsletter".
- On a store, the obstacle they hit — shipping cost, returns policy, or a small first-order discount. On a cart page, an exit offer is a rescue attempt; the follow-up by email is covered in WooCommerce abandoned cart.
- A related page — sometimes the right exit prompt is just a link to the article they were actually looking for.
What does not fit: a survey, account registration, or a discount on a purely informational page where the reader was never shopping.
Frequency caps
Exit intent fires on every page view, so without caps a visitor who browses five pages sees five popups.
- Once per visitor, then suppressed for a number of days after dismissal.
- Never after conversion, including signups through other forms on the site.
- One overlay per page view across all tools, so the exit popup never stacks on top of a welcome popup or the cookie notice.
- Exclude checkout and account pages. Interrupting payment is how you lose the sale the popup was meant to save.
Building one in WordPress
Most popup plugins include an exit-intent trigger; the questions are how it behaves on mobile, whether the script loads only where a campaign can fire, and whether it respects the frequency rules above. Page-builder popups can do it too — Elementor popup issues covers the usual reasons they fail to trigger.
If exit popups are part of a real testing programme — different offers per category, cart-aware rules on a store, split tests — a hosted service such as OptinMonster is built around that use.
Measuring
Record the conversion rate per view, separately for desktop and mobile — combined numbers hide a mobile trigger that annoys far more than it earns. Watch whether pages showing the popup lose returning visitors over the following weeks. And compare against an inline form at the end of the same page: if the exit popup only harvests people who would have signed up anyway, it is adding friction for nothing.
Common mistakes
- Arming the trigger on page load, so the first upward mouse movement fires it.
- A mobile fallback that is really a timer firing on arrival.
- No suppression after signup, so subscribers keep seeing the offer.
- A fullscreen takeover on phones instead of a slide-in.
- A close button that is hard to find or tap — the accessibility checklist applies to popups too.
Verify
On desktop, open the page in a private window, wait a few seconds, then move the cursor out through the top edge: the popup should appear once and not again on the next page. Press Esc and confirm it closes and focus returns to the page. On a phone, scroll through an article normally and confirm nothing fires on arrival.
Frequently asked
- Not in the desktop sense: there is no cursor to leave the window. Mobile tools substitute other signals — a fast scroll back towards the top, a period of inactivity, or the visitor switching tabs — which are less precise and fire on some people who were not leaving.
- Not by themselves. The intrusive-interstitial concern is about overlays that cover the content on mobile, especially on arrival. An exit popup fires after the visitor has read the page, so it does not fall into that pattern — provided the mobile fallback is not set to fire on arrival.
- Once per visitor for a set number of days after dismissal, and never again after they convert. Showing it on every page view trains visitors to close it without reading.