Exit-Intent Popups
Overview
Exit-intent popups detect when a visitor is about to leave — by tracking rapid mouse movement toward the browser's address bar on desktop — and display a targeted offer. When implemented with proper targeting and frequency capping, they recover 5–10% of otherwise lost visitors. Dedicated popup apps handle all the detection logic, A/B testing, and ESP integration — no custom code needed.
When to Use This Skill
- When site bounce rate is above 60% and conversion rate is below 2%
- When capturing email addresses for the marketing list during the session
- When offering a first-purchase discount to new visitors who haven't converted
- When reminding checkout abandoners about items in their cart before they leave
- When A/B testing popup offer types (% off vs. free shipping vs. free gift)
Core Instructions
Step 1: Choose the right popup tool
| Platform |
Recommended Tool |
Why |
| Shopify |
Klaviyo Forms (free, syncs to Klaviyo) or Privy ($30/mo) |
Klaviyo Forms integrates directly with Klaviyo flows; Privy includes A/B testing, unique coupon codes, and detailed analytics |
| WooCommerce |
OptinMonster ($9/mo) or Popup Maker (free) |
OptinMonster has exit-intent detection, A/B testing, and WooCommerce integration; Popup Maker is simpler and free |
| BigCommerce |
Justuno or Klaviyo Forms |
Both have native BigCommerce integrations and exit-intent detection |
| Custom / Headless |
Klaviyo Forms (via JavaScript embed) or custom implementation |
Klaviyo Forms works on any site with a JavaScript snippet |
Step 2: Configure exit-intent detection and targeting
Most popup tools have exit-intent built in. The key is configuring it correctly to avoid annoying visitors.
Shopify with Klaviyo Forms
- In Klaviyo, go to Sign-up Forms → Create Form
- Choose Popup as the form type
- Under Targeting, set:
- Display when: Exit intent (mouse moves to top of browser)
- Delay: 5 seconds minimum time on page before activating
- Frequency: Show once per 14 days (Klaviyo manages this via cookie)
- Under Targeting → Conditions, add:
- Show only on: Homepage, product pages, collection pages
- Do NOT show on: /checkout, /cart, /account
- Do NOT show to: Existing subscribers (Klaviyo checks this automatically for identified profiles)
- Under Form Content, set your offer:
- For email capture: "Get 10% off your first order" + email input + GDPR consent checkbox
- For cart reminder: "You have items in your cart — complete your purchase" + link back to cart
- Under Success Action, create a discount code:
- Connect to Shopify → Discounts — Klaviyo can automatically create unique single-use 10% off codes
- These codes appear in the success message and are automatically synced to the subscriber's profile
Shopify with Privy
- Install Privy from the Shopify App Store
- Go to Privy → Displays → New Display → Popup
- Under When to show, select "Exit intent"
- Under Who to show it to, configure:
- New visitors only (suppress for logged-in customers)
- Minimum 30 seconds on site
- Not in checkout
- Frequency cap: 14 days
- Under Offers, Privy automatically generates unique coupon codes synced to Shopify's discount system
- Connect Privy to Klaviyo or Mailchimp under Integrations for automatic list sync
WooCommerce with OptinMonster
- Install OptinMonster plugin from the WordPress directory
- Create a new campaign: Popup → Exit Intent
- Under Display Rules, configure:
- Exit Intent trigger: sensitivity = Medium
- Time on page: minimum 30 seconds
- Page targeting: include homepage, shop, product pages; exclude checkout, cart, my-account
- Frequency: 14-day cookie suppression (OptinMonster default)
- Under Integrations, connect to Mailchimp, Klaviyo, or your email provider
- For unique coupon codes: use WooCommerce → Coupons to create a coupon, then display the code in the success message (OptinMonster does not auto-generate unique codes on free tiers)
BigCommerce with Justuno
- Install Justuno from the BigCommerce App Marketplace
- Go to Justuno → Promotions → New Popup
- Configure exit intent triggers, targeting rules, and A/B test variants through the visual builder
- Justuno integrates with Klaviyo and Mailchimp for list sync
Custom / Headless
For custom builds, Klaviyo Forms works on any website:
- Add the Klaviyo JavaScript snippet to your site
- Go to Klaviyo → Sign-up Forms → Create Form and configure as above
- Klaviyo handles exit detection, frequency capping, and list sync
If you need full control over the popup behavior (custom exit detection logic):
function initExitIntent({ threshold = 20, delay = 5000, onExitIntent }) {
let activated = false;
setTimeout(() => {
document.addEventListener('mouseleave', (e) => {
if (e.clientY <= 0 && !activated) {
activated = true;
onExitIntent();
}
});
}, delay);
// Mobile: use visibilitychange instead of mouseleave
document.addEventListener('visibilitychange', () => {
if (document.visibilityState === 'hidden' && !activated) {
activated = true;
onExitIntent();
}
});
}
// Check frequency cap using localStorage
function shouldShowPopup(popupId, capDays = 14) {
const lastSeen = localStorage.getItem(`popup_seen_${popupId}`);
if (!lastSeen) return true;
return (Date.now() - parseInt(lastSeen)) > capDays * 86400000;
}
Step 3: Configure the offer and A/B test
The most impactful thing to test is the offer type. Run one A/B test at a time:
| Offer Type |
Best For |
Typical Email Capture Rate |
| 10% off first order |
General merchandise |
3–8% of popup views |
| Free shipping |
High-AOV stores (shipping is expensive) |
4–9% of popup views |
| Free gift with purchase |
Beauty, supplements |
5–10% of popup views |
| Content offer ("Download our guide") |
B2C brands with content |
2–5% |
In Klaviyo/Privy: create two variants of your form with different offers, split traffic 50/50, and measure conversion rate over 2 weeks before picking a winner.
Step 4: Generate unique discount codes (not generic codes)
Generic codes like WELCOME10 get shared on coupon sites and inflate your attribution:
- Shopify + Klaviyo: Klaviyo automatically generates unique single-use Shopify discount codes — enable this in the form's success action settings
- Shopify + Privy: Privy connects to Shopify's discount system and generates unique codes automatically
- WooCommerce: Use the WooCommerce Unique Coupon Generator plugin, or create a general code with per-customer usage limit
Best Practices
- Always include a control/holdout group (20–30%) — without a holdout, you cannot tell if the popup is adding value or just capturing conversions that would have happened anyway (most popup apps support this)
- Delay activation by at least 5 seconds — popups that fire immediately train visitors to close them without reading
- Frequency cap at 14 days minimum — all major popup apps handle this via cookie automatically; verify it is enabled
- Never pre-check the email consent checkbox — GDPR requires explicit opt-in; pre-checked boxes are not valid consent in the EU
- Generate unique one-time codes — generic codes (WELCOME10) get shared on coupon sites
- Exclude already-subscribed visitors — Klaviyo checks this automatically; for other tools, suppress via cookie
Common Pitfalls
| Problem |
Solution |
| Popup fires immediately on page load |
Set minimum 5-second delay AND minimum scroll depth (20%) in targeting settings |
| Popup shown to same user on every visit |
Verify frequency capping is enabled in your popup app (Klaviyo: 14 days; Privy: configurable; OptinMonster: configurable) |
| Exit intent fires on mobile |
Switch to scroll-based or time-based triggers for mobile; most tools do this automatically when exit-intent is selected |
| No way to measure whether the popup helps conversion |
Enable A/B testing with a control group in your popup app; most support this natively |
| High popup-driven unsubscribe rate |
The offer is not compelling enough; test free shipping vs. % off; also check that emails are sending too frequently after signup |
Related Skills
- @cart-abandonment-recovery
- @email-marketing-automation
- @conversion-rate-optimization
- @push-notifications
- @first-party-data-collection
1---2name: exit-intent-popups3description: Capture leaving visitors with targeted exit-intent popups that show personalized offers, email capture forms, and respect frequency capping rules4---56# Exit-Intent Popups78## Overview910Exit-intent popups detect when a visitor is about to leave — by tracking rapid mouse movement toward the browser's address bar on desktop — and display a targeted offer. When implemented with proper targeting and frequency capping, they recover 5–10% of otherwise lost visitors. Dedicated popup apps handle all the detection logic, A/B testing, and ESP integration — no custom code needed.1112## When to Use This Skill1314- When site bounce rate is above 60% and conversion rate is below 2%15- When capturing email addresses for the marketing list during the session16- When offering a first-purchase discount to new visitors who haven't converted17- When reminding checkout abandoners about items in their cart before they leave18- When A/B testing popup offer types (% off vs. free shipping vs. free gift)1920## Core Instructions2122### Step 1: Choose the right popup tool2324| Platform | Recommended Tool | Why |25|----------|-----------------|-----|26| **Shopify** | Klaviyo Forms (free, syncs to Klaviyo) or Privy ($30/mo) | Klaviyo Forms integrates directly with Klaviyo flows; Privy includes A/B testing, unique coupon codes, and detailed analytics |27| **WooCommerce** | OptinMonster ($9/mo) or Popup Maker (free) | OptinMonster has exit-intent detection, A/B testing, and WooCommerce integration; Popup Maker is simpler and free |28| **BigCommerce** | Justuno or Klaviyo Forms | Both have native BigCommerce integrations and exit-intent detection |29| **Custom / Headless** | Klaviyo Forms (via JavaScript embed) or custom implementation | Klaviyo Forms works on any site with a JavaScript snippet |3031### Step 2: Configure exit-intent detection and targeting3233Most popup tools have exit-intent built in. The key is configuring it correctly to avoid annoying visitors.3435---3637#### Shopify with Klaviyo Forms38391. In Klaviyo, go to **Sign-up Forms → Create Form**402. Choose **Popup** as the form type413. Under **Targeting**, set:42 - **Display when**: Exit intent (mouse moves to top of browser)43 - **Delay**: 5 seconds minimum time on page before activating44 - **Frequency**: Show once per 14 days (Klaviyo manages this via cookie)454. Under **Targeting → Conditions**, add:46 - Show only on: Homepage, product pages, collection pages47 - Do NOT show on: /checkout, /cart, /account48 - Do NOT show to: Existing subscribers (Klaviyo checks this automatically for identified profiles)495. Under **Form Content**, set your offer:50 - For email capture: "Get 10% off your first order" + email input + GDPR consent checkbox51 - For cart reminder: "You have items in your cart — complete your purchase" + link back to cart526. Under **Success Action**, create a discount code:53 - Connect to **Shopify → Discounts** — Klaviyo can automatically create unique single-use 10% off codes54 - These codes appear in the success message and are automatically synced to the subscriber's profile5556---5758#### Shopify with Privy59601. Install Privy from the Shopify App Store612. Go to **Privy → Displays → New Display → Popup**623. Under **When to show**, select "Exit intent"634. Under **Who to show it to**, configure:64 - New visitors only (suppress for logged-in customers)65 - Minimum 30 seconds on site66 - Not in checkout67 - Frequency cap: 14 days685. Under **Offers**, Privy automatically generates unique coupon codes synced to Shopify's discount system696. Connect Privy to Klaviyo or Mailchimp under **Integrations** for automatic list sync7071---7273#### WooCommerce with OptinMonster74751. Install OptinMonster plugin from the WordPress directory762. Create a new campaign: **Popup → Exit Intent**773. Under **Display Rules**, configure:78 - **Exit Intent** trigger: sensitivity = Medium79 - **Time on page**: minimum 30 seconds80 - **Page targeting**: include homepage, shop, product pages; exclude checkout, cart, my-account81 - **Frequency**: 14-day cookie suppression (OptinMonster default)824. Under **Integrations**, connect to Mailchimp, Klaviyo, or your email provider835. For unique coupon codes: use WooCommerce → Coupons to create a coupon, then display the code in the success message (OptinMonster does not auto-generate unique codes on free tiers)8485---8687#### BigCommerce with Justuno88891. Install Justuno from the BigCommerce App Marketplace902. Go to **Justuno → Promotions → New Popup**913. Configure exit intent triggers, targeting rules, and A/B test variants through the visual builder924. Justuno integrates with Klaviyo and Mailchimp for list sync9394---9596#### Custom / Headless9798For custom builds, Klaviyo Forms works on any website:991001. Add the Klaviyo JavaScript snippet to your site1012. Go to **Klaviyo → Sign-up Forms → Create Form** and configure as above1023. Klaviyo handles exit detection, frequency capping, and list sync103104If you need full control over the popup behavior (custom exit detection logic):105106```javascript107function initExitIntent({ threshold = 20, delay = 5000, onExitIntent }) {108 let activated = false;109110 setTimeout(() => {111 document.addEventListener('mouseleave', (e) => {112 if (e.clientY <= 0 && !activated) {113 activated = true;114 onExitIntent();115 }116 });117 }, delay);118119 // Mobile: use visibilitychange instead of mouseleave120 document.addEventListener('visibilitychange', () => {121 if (document.visibilityState === 'hidden' && !activated) {122 activated = true;123 onExitIntent();124 }125 });126}127128// Check frequency cap using localStorage129function shouldShowPopup(popupId, capDays = 14) {130 const lastSeen = localStorage.getItem(`popup_seen_${popupId}`);131 if (!lastSeen) return true;132 return (Date.now() - parseInt(lastSeen)) > capDays * 86400000;133}134```135136### Step 3: Configure the offer and A/B test137138The most impactful thing to test is the offer type. Run one A/B test at a time:139140| Offer Type | Best For | Typical Email Capture Rate |141|-----------|---------|--------------------------|142| 10% off first order | General merchandise | 3–8% of popup views |143| Free shipping | High-AOV stores (shipping is expensive) | 4–9% of popup views |144| Free gift with purchase | Beauty, supplements | 5–10% of popup views |145| Content offer ("Download our guide") | B2C brands with content | 2–5% |146147**In Klaviyo/Privy**: create two variants of your form with different offers, split traffic 50/50, and measure conversion rate over 2 weeks before picking a winner.148149### Step 4: Generate unique discount codes (not generic codes)150151Generic codes like WELCOME10 get shared on coupon sites and inflate your attribution:152153- **Shopify + Klaviyo**: Klaviyo automatically generates unique single-use Shopify discount codes — enable this in the form's success action settings154- **Shopify + Privy**: Privy connects to Shopify's discount system and generates unique codes automatically155- **WooCommerce**: Use the WooCommerce Unique Coupon Generator plugin, or create a general code with per-customer usage limit156157## Best Practices158159- **Always include a control/holdout group** (20–30%) — without a holdout, you cannot tell if the popup is adding value or just capturing conversions that would have happened anyway (most popup apps support this)160- **Delay activation by at least 5 seconds** — popups that fire immediately train visitors to close them without reading161- **Frequency cap at 14 days minimum** — all major popup apps handle this via cookie automatically; verify it is enabled162- **Never pre-check the email consent checkbox** — GDPR requires explicit opt-in; pre-checked boxes are not valid consent in the EU163- **Generate unique one-time codes** — generic codes (WELCOME10) get shared on coupon sites164- **Exclude already-subscribed visitors** — Klaviyo checks this automatically; for other tools, suppress via cookie165166## Common Pitfalls167168| Problem | Solution |169|---------|----------|170| Popup fires immediately on page load | Set minimum 5-second delay AND minimum scroll depth (20%) in targeting settings |171| Popup shown to same user on every visit | Verify frequency capping is enabled in your popup app (Klaviyo: 14 days; Privy: configurable; OptinMonster: configurable) |172| Exit intent fires on mobile | Switch to scroll-based or time-based triggers for mobile; most tools do this automatically when exit-intent is selected |173| No way to measure whether the popup helps conversion | Enable A/B testing with a control group in your popup app; most support this natively |174| High popup-driven unsubscribe rate | The offer is not compelling enough; test free shipping vs. % off; also check that emails are sending too frequently after signup |175176## Related Skills177178- @cart-abandonment-recovery179- @email-marketing-automation180- @conversion-rate-optimization181- @push-notifications182- @first-party-data-collection