← All case studies
PDPNext.js · React 17+EXP-07Jul 2026

Global outdoor-gear brand · Outdoor & mobile-living gearA confirmation popup that only fires on a real add

After adding to bag there was no clear confirmation or next step. The variant shows a card on desktop and a bottom sheet on mobile, but only once the cart API has actually said yes.

ClientGlobal outdoor-gear brand
PlatformNext.js · React 17+
PagePDP
Measured onBag views, Checkout starts, Conversion rate
Observation
  • Add-to-bag gave shoppers no obvious prompt to view the bag or continue.
  • The buy box has a form submit button that shows a loading state during roughly two seconds of hydration, plus a sticky call to action with its own markup.
  • Related-product tiles carry their own add-to-cart buttons, so a broad selector would fire for the wrong product.
Hypothesis

A confirmation shown only after a successful add will increase bag views and checkout progression, without ever appearing on a failed add.

What I built
  • Desktop: fixed top-right card with fade and slide. Mobile: bottom sheet.
  • A two-step gate: an add click arms a ten-second window, and the popup renders only on a confirmed successful response from the cart API.
  • Fetch and XHR patched once, guarded, to observe the cart call, with zero overhead outside the armed window.
  • Price parsed from the combined sale and original price text with a currency-aware pattern.
The hard parts

Listening before React

A bubble-phase listener on the document was cut off by React's stopPropagation. A capture-phase listener fires first and sees every click.

Two buttons, one product

Detection scoped to the buy box, matching structure and accessible labels exactly, so related-product buttons never trigger the popup.

Outcome

Measured on bag views, checkout starts, conversion rate. Test results belong to the client and are shared in conversation, with their permission, rather than published here.

More experiments

View all →