Why Exit-Intent Popups Work
Exit-intent popups convert visitors who are about to leave without taking any action. These are visitors who have already engaged enough to read your content but have not converted yet. An exit-intent popup gives you one more opportunity to offer them something valuable before they leave.
The key to an effective popup: offer something specific and valuable, show it at the right moment (when leaving, not on arrival), and control frequency so it does not annoy repeat visitors.
The three frequency controls that matter: do not show on the same session twice (sessionStorage flag), do not show again for 30 days after dismissal (localStorage with expiry timestamp), and never show to someone who has already subscribed (check against the email field being pre-filled or against a localStorage flag set after submission).
The Popup Prompt for Claude
"Add an exit-intent email capture popup to my Replit site. The popup should: trigger when the user's cursor moves toward the top of the browser (exit intent), only show once per session and not again for 30 days after dismissal using localStorage, show a headline [your headline], a short description [your description], and a form with first name and email fields. On submission, POST to /api/subscribe and show a success message. Close the popup when the user clicks outside it or the X button. Add a class 'popup-shown' to localStorage to track whether it has been shown."