How to test an exit popup
A/B test exit-intent pop-ups in Convert with proper experimentation rigor
| Author | Amrin Rajani |
IN THIS ARTICLE YOU WILL:
Testing exit-intent pop-ups is a common way for ecommerce teams to validate offers, messages, or interruption strategies before rolling them out more widely.
Today, Convert provides a native Pop-up Creator that allows CRO teams to create and A/B test pop-ups directly inside Convert, using the same targeting rules, stats engine, and experimentation workflow as any other test.
This is the recommended approach for testing exit pop-ups and other interruption-based experiences.
This article also includes guidance on using custom JavaScript-based exit pop-ups for advanced or legacy scenarios where a bespoke implementation is still required.
Recommended approach: use Convert’s native Pop-up Creator
If your goal is to test an exit pop-up (rather than permanently deploy one), we strongly recommend using Convert’s Pop-up Creator.
With Pop-up Creator, you can:
-
Create exit-intent pop-ups directly in the Visual Editor
-
Run proper A/B tests using Convert’s experimentation framework
-
Use the same targeting rules and stats engine as any other experiment
-
Iterate quickly without custom JavaScript or engineering support
This ensures exit pop-ups are evaluated with speed, rigor, and confidence, instead of being shipped based on assumptions.
🔔 Tip: For most use cases, such as offer validation, message testing, or interruption strategy testing, Pop-up Creator should be your first choice.
👉 Learn how to create and test pop-ups using Convert’s Pop-up Creator (link to Pop-up Creator documentation).
When to use custom JavaScript exit pop-ups
In some cases, teams may still choose to test an exit pop-up using custom JavaScript, for example:
-
Maintaining or modifying a legacy implementation
-
Requiring highly bespoke behavior that falls outside the scope of Pop-up Creator
-
Testing a third-party widget that cannot be recreated natively
The example below shows how a JavaScript-based exit-intent pop-up can be added to a Convert experiment for these advanced scenarios.
Note: This approach requires custom code and extra QA to make sure experiment results are tracked correctly.
Example: testing an exit-intent pop-up using JavaScript
Convert allows you to add JavaScript or HTML to specific variations in an A/B experiment, which makes it possible to test custom components such as exit pop-ups.
We decided to choose an open-source Exit-Intent Popup that is freely available for anyone use. We do not endorse, guarantee, or recommend the linked software. We only show it for demonstration purposes.
Firstly, we create a Convert AB Experiment. Then, while in the Visual Editor, we open our Variation JS editor:

Then copy the minified Exit Intent Pop Up minified javascript code in the editor. After that add the template code. Then apply the changes and save it.
You can have a preview of your variation with the Live Preview.
Your page where you created will show. Try to navigate out of it, and your popup will show:
You can customize the code to your desire.
Summary
- Use Pop-up Creator for most exit pop-up testing scenarios
- Rely on custom JavaScript only for advanced or legacy needs
- Treat exit pop-ups as experiments, not just UI elements
By testing exit-intent pop-ups with the same discipline as any other experiment, you can validate interruption-based UX decisions with confidence.
👉 Learn how to create and test pop-ups using Convert’s Pop-up Creator (link to Pop-up Creator documentation).