Back to Snippets
+18% Conversion LiftHomepage

Exit Intent Popup

Capture abandoning visitors with a high-converting offer just before they leave your site.

What This Snippet Does

  • Mouse velocity tracking; Mobile back-button detection; A/B testing built-in; Email integration (Klaviyo
  • Mailchimp); Discount code auto-copy
Code Preview
document.addEventListener('mouseleave', (e) => {
  if (e.clientY < 0 && !sessionStorage.getItem('popupShown')) {
    const popup = document.getElementById('exit-popup');
    popup.classList.add('visible');
    sessionStorage.setItem('popupShown', 'true');
    analytics.track('Exit Intent Triggered');
  }
});

One-time purchase

$34USD
4.6(156)

Instant download • Lifetime updates

What you get:

  • Full source code
  • Installation documentation
  • Free future updates
  • Email support
Collective.

Premium Shopify code snippets to boost conversion rates without the monthly app fees.

Subscribe

Get the latest snippets and conversion tips.

2022-2026 Collective Theme. All rights reserved.