Simple Exit Pop
A lightweight WordPress plugin: responsive exit-intent popup with A/B testing, frequency control, and impression/click tracking.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/lbradbard/simple-exit-pop/archive/refs/heads/main.zipReadme
Simple Exit Pop
A lightweight WordPress plugin that displays a responsive exit-intent popup ad — with separate desktop (16:9) and mobile (9:16) creative, frequency control, A/B testing, and built-in impression/click-through tracking.
Built for small businesses who want a simple, no-dependency way to catch visitors before they leave the site, without pulling in a heavyweight marketing plugin.
Features
- Responsive creative — automatically serves a widescreen image on desktop and a vertical image on mobile, using the browser's native
<picture>element (no JS-based device detection needed for image selection). - Exit-intent trigger — desktop uses
mouseleaveat the top of the viewport; mobile uses thevisibilitychangeevent (tab/app switch) as a practical substitute, since true mouse-based exit intent doesn't exist on touch devices. - Frequency control — choose how often the same visitor sees the popup (every page load, once per day/week/month, or once ever), enforced via a cookie.
- A/B testing — optionally split visitors 50/50 between two creative variants (A/B), each with its own image pair and destination link. Assignment is randomized once per visitor and persisted via cookie so repeat visits during a test period stay consistent.
- Impression + click tracking — every popup display and every click-through is logged via AJAX, broken out by device (desktop/mobile) and by variant (A/B), with a performance table (CTR included) right on the settings page.
- Zero external dependencies — pure PHP + jQuery (already bundled with WordPress core), no build step, no npm install.
Installation
- Download the latest release zip (or clone this repo into
wp-content/plugins/). - In WordPress: Plugins → Add New → Upload Plugin, select the zip, then Install Now → Activate.
(If installing from a git clone instead of a zip, just make sure the folder lives at
wp-content/plugins/simple-exit-pop/.) - Go to Settings → Simple Exit Pop.
- Upload your desktop (recommended 1200×628) and mobile (recommended 1080×1920) images for Variant A.
- Optionally set a destination link, adjust the show frequency, and/or enable A/B testing with a second image pair + link.
- Save Settings and test on both desktop and mobile.
Folder structure
simple-exit-pop/
simple-exit-pop.php # Main plugin file — settings, hooks, AJAX handlers
assets/
popup.css # Frontend popup styling
popup.js # Frontend trigger, A/B assignment, and tracking logic
admin.js # Settings-page media picker integration
How A/B testing works
When enabled, each visitor is randomly assigned Variant A or B the first time the popup fires, and that assignment is stored in a cookie (mep_variant, 365-day expiry) so they keep seeing the same variant across sessions. Impressions and clicks are recorded per-variant, and a comparison table (impressions, clicks, CTR) is shown at the top of the settings page.
Frequency control
The popup won't reshow to the same visitor within the selected window (day/week/month/forever), tracked via a mep_popup_seen cookie. Setting frequency to "Every page load" disables this gating entirely.
Requirements
- WordPress 5.0+
- PHP 7.4+
- jQuery (bundled with WordPress — no additional dependency)
License
GPL v2 or later — see LICENSE.
Author
Lou Bradbard