User guide
Promo Exit Intent for Magento 2: User Guide
Show the right offer to visitors who are about to leave, and see in a conversion report with a control group what it really earns.
- Version 1.2.0
- Magento 2.4.7 to 2.4.9
- PHP 8.2 to 8.5
- Hyvä and Luma
Exit Intent Offers shows an offer to visitors who are about to leave your shop: a personal coupon, an e-mail sign-up, a message with a link, or a game from another CommerceGears promotion (a Spin to Win wheel or a Scratch & Win card). You decide which offer fits which visit: basket value and items, customer group, new or returning visitors, landing source, page and device. The conversion report tells you what each offer earns, and with a control group you can compare visitors who saw the offer with visitors who did not.
- Demo, storefront (Luma): https://demo.commercegears.com/jupiter-all-weather-trainer.html?tour=promo-exit-intent
- Demo, storefront (Hyvä): https://demo.commercegears.com/hyva/jupiter-all-weather-trainer.html?tour=promo-exit-intent
- Admin demo: https://demo.commercegears.com/try-admin/promo-exit-intent
Requirements
| Magento | Magento Open Source and Adobe Commerce 2.4.7 to 2.4.9 |
| PHP | 8.2 to 8.5 |
| Themes | Luma and Hyvä (the checkout uses Luma) |
| Modules | commercegears/module-core ^2.0, commercegears/module-promo-core ^2.0 (installed with Composer) |
Installation
Set up Composer access to repo.commercegears.com as described on https://commercegears.com/composer-access/, then run:
composer require commercegears/module-promo-exit-intent
bin/magento module:enable CommerceGears_Core CommerceGears_PromoCore CommerceGears_PromoExitIntent
bin/magento setup:upgrade
bin/magento setup:di:compile # production mode
bin/magento setup:static-content:deploy # production mode
bin/magento cache:flushThe module creates three tables: commercegears_promo_exit_offer (offers), commercegears_promo_exit_exposure (visitors who were eligible for an offer) and commercegears_promo_exit_conversion (orders attributed to an offer).
Configuration
Stores > Configuration > CommerceGears > Promotions > Exit Intent Offers.
General
- Enabled (store view): when off, no exit offer is shown or claimed. Coupons already issued keep working. Default: Yes.
- Coupon Reason (store view): stored with every coupon the module issues and shown in the Coupon Wallet. Empty: "Exit offer".
- Requests per Minute per IP Address (global): limit for the storefront requests of the popup (choosing an offer, recording that it opened, claiming it). Claims have a stricter limit of their own. Default: 60.
Triggers
- Back Button on Mobile (store view): on touch screens the page adds one entry to the browser history, so the first press of Back opens the offer instead of leaving the page and the second press leaves. This works well but some visitors find it annoying and some browsers ignore it, which is why it is off by default. Only offers with the "Back button" trigger use it.
- Fast Scroll Up Speed (store view): how fast (pixels per millisecond) a visitor on a touch screen must scroll back up, after reading at least one screen, for the "Fast scroll up" trigger. A higher value means fewer popups. Default: 1.5.
Conversion Report
- Attribution Window (Days): an order counts as a conversion when the same visitor, customer account or basket became eligible for an offer at most this many days before. Orders that use the offer's coupon always count. 1 to 90, default 7.
- Keep Report Data (Days): visitor records and attributed orders older than this are deleted every night. 0 keeps them. Default: 400.
Settings shared by all promotions (coupon code format, newsletter subscription on consent, popups per visit and minutes between popups) are under CommerceGears > Promotions > Configuration.
Creating an offer
CommerceGears > Promotions > Exit Intent Offers > Add New Offer. A new offer is filled in with a working example (10% coupon for visitors with products in the basket) and is inactive until you switch it on.
Offer
- Offer Name: for you only.
- Active, Store Views, Starts, Ends: the offer shows between its dates (store time zone). Make one offer per store view when its texts must be in another language.
- Priority: when several offers fit a visit, the one with the highest priority is chosen. The priority also competes with the popups of other CommerceGears promotions; only one promotion popup opens per page view.
Who Sees It
All conditions must match. Empty fields mean "any".
- Customer Groups: NOT LOGGED IN is guests.
- Customer Segments: shown when a segment provider such as Personalised Offers is installed.
- Basket: any basket, products in the basket, or an empty basket.
- Basket Subtotal From / To: subtotal before discounts, in the base currency. Both values are included.
- Items in Basket From / To: total quantity of all items.
- Visitor: new visitors are on their first visit in this browser; logged-in customers always count as returning.
- Minimum Number of Visits: visits (browser sessions) in this browser including the current one.
- Minimum Page Views in the Visit.
- Landing Source (utm_source): only visits that started on a page with one of these
utm_sourcevalues, for examplenewsletter, google. - Pages: all pages (basket excluded), or home, category, product, search, CMS, basket, account and other pages. Checkout pages never show an exit offer.
- Specific Pages (optional, narrow the page types): Categories (category pages), Products (product pages, by SKU or product ID, one per line), CMS Pages (URL keys such as
about-us; the home page is its CMS page's identifier, usuallyhome) and URL Paths (one per line,*matches any characters, for example/gear/*or/sale.html; the store code part such as/de/may be left out). A page that fits any entry counts; with all four empty every page of the chosen types counts. - Device: desktop and mobile, desktop only, or mobile and tablet only.
Basket, customer group and segments are checked on the server. Page, device and visit history are reported by the browser; they only decide which offer a visitor sees.
When It Opens
- Triggers (one or more):
- Mouse leaves the window (desktop): the pointer leaves the top of the browser window.
- Fast scroll up (touch screens).
- Back button (touch screens): needs the "Back Button on Mobile" setting.
- Inactivity: no mouse, keyboard, scroll or touch for Inactivity Seconds (at least 5).
- Coming back to the tab: the visitor switched to another tab and comes back.
- Minimum Seconds on the Page: no trigger fires earlier. Default: 5.
- Frequency: once per visit, once every N days (Days Between Showings), or once per visit until the visitor claims the offer or places an order. A claimed offer never shows again to that visitor.
- Control Group (%): share of the eligible visitors who see nothing (0 to 90, default 0). The same browser always stays in the same group for an offer. See "Reading the conversion report" below.
What It Offers
- Offer Type:
- Personal coupon: Discount (percentage of the basket, fixed amount off the basket or free shipping), Discount Amount, Coupon Minimum Subtotal and Coupon Valid for (Days). Every visitor gets a personal, single-use code. Guests enter their e-mail address to get it; logged-in customers just claim. Asking again in the same browser with the same e-mail address, or in the same account, shows the same code. Someone who only types an e-mail address that already has a code is told the offer was already claimed and does not see the code. Once the code was used in an order, the offer cannot be claimed again with the same details. Coupon Applies to Categories and Coupon Applies to SKUs (optional) limit the discount to those products, like the "Apply to" conditions of a cart price rule; a free shipping coupon then needs one of them in the basket. Say so in the offer's text. A change applies to the offer's codes issued before too, from the next claim on. The module creates one hidden cart price rule per offer and discount ("[Promo] Exit Intent Offers ..."); change the discount in the offer, not in the rule.
- E-mail sign-up (newsletter): the e-mail address is stored as a lead (CommerceGears > Promotions > Leads).
- Message and link: a button to Button Link (a page of your shop such as
/sale.htmlor a full URL), or a button that closes the popup when the link is empty. - Game: Spin to Win wheel / Game: Scratch & Win card: listed when those modules are installed, switched on and have a running campaign. Game Campaign ID picks the wheel or card; empty uses the running one with the highest priority. The game's own prizes, limits and reports apply.
- Newsletter Consent Text and Consent Required (coupon and e-mail offers): shown as a tick box. When ticked, the address is subscribed to the newsletter if "Subscribe to Newsletter on Consent" is on in the promotions configuration.
Design
Eyebrow, title, text, image (JPG, PNG, GIF or WebP up to 2 MB, shown as a banner above the text), button text, decline link text ("No thanks"), success title (shown with the code or after the sign-up), small print, layout (centred popup or slide-in at the side on desktops), bottom sheet on mobile, accent, background and text colours. Empty colours use the promotions popup colours, which you can also set for all promotions in your theme with CSS variables such as --sw-promo-accent.
On the storefront
The page asks the server which offer fits the visit shortly after it has loaded, then watches the offer's triggers. When a trigger fires, the visitor either sees the popup or, in the control group, nothing; both are recorded. The popup is keyboard operable, traps the focus, closes with Escape and respects "reduced motion". Pages stay full-page cached: nothing personal is written into the cached HTML.
Reading the conversion report
CommerceGears > Promotions > Exit Intent Report, or the "Conversion Report" button of an offer.
- Eligible: visitors for whom the offer fitted and a trigger fired, counted once per offer while they keep becoming eligible within the attribution window, on the day they were first eligible.
- Shown and Held Back: the two groups. Without a control group everyone is shown.
- Claimed: shown visitors who took the coupon or signed up.
- Coupon Orders and Coupon Revenue: orders that used the coupon the offer issued (grand total, base currency).
- Conversion Shown and Conversion Held Back: share of the visitors in each group who placed any order within the attribution window, matched by the same browser, customer account or basket. Both groups are measured the same way.
- Uplift: conversion shown minus conversion held back, in percentage points. A positive uplift means the offer brought orders that would not have happened anyway.
- Revenue per Visitor: window revenue divided by the visitors of the group.
Filter by date and offer, see the daily chart and export the table as CSV. The PromoCore Promotions Overview also lists the source "Exit Intent Offers" with shown, claimed, coupons issued and used and their revenue.
Small control groups take time to give a reliable answer: with 10% held back you need many eligible visitors before the difference means something. Keep an offer unchanged while you measure it.
CLI
bin/magento commercegears:promo:exit-intent:report [--from=YYYY-MM-DD] [--to=YYYY-MM-DD] [--offer=ID] [--json]Prints the report for a period (default: the last 30 days).
Permissions (ACL)
CommerceGears > Promotions > Exit Intent Offers:
- Manage Exit Offers (offer grid and form, image upload)
- Exit Offer Conversion Report (report and CSV)
- Exit Intent Settings (configuration section)
Troubleshooting
- No popup appears: check that the module is enabled for the store view, the offer is active and within its dates, and that it matches the visit (basket, group, page, device). Only one promotion popup opens per page view and per the limits in CommerceGears > Promotions > Configuration; another promotion may have used the slot. Visitors in the control group never see the popup. Each offer shows only as often as its frequency allows; to try it again use a private browser window.
- "Mouse leaves the window" never fires on phones: phones have no mouse; use fast scroll up, back button, inactivity or coming back to the tab.
- A game offer is not listed: the game module must be installed, switched on and have a running campaign in the store view.
- The coupon does not apply: check the coupon's minimum subtotal and validity date. Personal coupons only work for the visitor they were issued to (PromoCore setting "Only the Owner Can Use a Personal Coupon").
- The report shows no orders: orders count only within the attribution window and when they come from the same browser, customer account or basket.
Uninstall
bin/magento module:disable CommerceGears_PromoExitIntent
composer remove commercegears/module-promo-exit-intent
bin/magento setup:upgradeThe tables commercegears_promo_exit_offer, commercegears_promo_exit_exposure and commercegears_promo_exit_conversion stay in the database until you drop them. Issued coupons and leads belong to PromoCore and stay valid.
This guide is for version 1.2.0 and also comes with the module, in docs/user-guide.md. All user guides