Skip to content

Retention & incrementality

E-commerceRetail

Recover abandoned Shopify carts without over-mailing

Track live Shopify cart state in Web Pixels, exit shoppers before sending if they check out on their own, and prove incremental revenue with a 10% randomized holdout.

Free monthly allowances on every meter. No per-seat fee.

8 min read~20 min active configUpdated
An open laptop showing a coffee roaster shopping cart next to a craft coffee bag, ceramic mug, and smartphone on a wooden table
Check live cart state before every reminder and measure real recovered revenue against a 10% holdout.

Interactive preview · Exit-safe journey & 10% holdout

Suppress reminders for early buyers and prove real incremental lift.

Every number below comes from one illustrative 30-day cohort (1,500 abandoned carts, 90% exposed vs 10% silent holdout) with a computed two-proportion significance test.

Illustrative fixture · Roast & Anchor Coffee
Apexapex / journeys / abandoned-cart-recovery
Out of 1,350 exposed shoppers, 135 purchased on their own during the 2-hour wait and exited with zero emails sent. The randomized holdout shows the reminder added +7.7 percentage points (95% CI +1.5 to +13.9 pts), or roughly 20 to 188 incremental orders over 30 days.
Why the 10% holdout matters

Calibrated impact

Production onlyv3
Exposure
Exposed
1350
90.0% of triggers
Holdout
150
10.0%: control group
Daily exposure (last 30 days)Day 1 → Day 30
Day 1: 50 triggered (45 exposed, 5 holdout)Day 2: 50 triggered (45 exposed, 5 holdout)Day 3: 50 triggered (45 exposed, 5 holdout)Day 4: 50 triggered (45 exposed, 5 holdout)Day 5: 50 triggered (45 exposed, 5 holdout)Day 6: 50 triggered (45 exposed, 5 holdout)Day 7: 50 triggered (45 exposed, 5 holdout)Day 8: 50 triggered (45 exposed, 5 holdout)Day 9: 50 triggered (45 exposed, 5 holdout)Day 10: 50 triggered (45 exposed, 5 holdout)Day 11: 50 triggered (45 exposed, 5 holdout)Day 12: 50 triggered (45 exposed, 5 holdout)Day 13: 50 triggered (45 exposed, 5 holdout)Day 14: 50 triggered (45 exposed, 5 holdout)Day 15: 50 triggered (45 exposed, 5 holdout)Day 16: 50 triggered (45 exposed, 5 holdout)Day 17: 50 triggered (45 exposed, 5 holdout)Day 18: 50 triggered (45 exposed, 5 holdout)Day 19: 50 triggered (45 exposed, 5 holdout)Day 20: 50 triggered (45 exposed, 5 holdout)Day 21: 50 triggered (45 exposed, 5 holdout)Day 22: 50 triggered (45 exposed, 5 holdout)Day 23: 50 triggered (45 exposed, 5 holdout)Day 24: 50 triggered (45 exposed, 5 holdout)Day 25: 50 triggered (45 exposed, 5 holdout)Day 26: 50 triggered (45 exposed, 5 holdout)Day 27: 50 triggered (45 exposed, 5 holdout)Day 28: 50 triggered (45 exposed, 5 holdout)Day 29: 50 triggered (45 exposed, 5 holdout)Day 30: 50 triggered (45 exposed, 5 holdout)Day 1: lift 22.2%Day 2: lift 22.2%Day 3: lift 11.1%Day 4: lift 11.1%Day 5: lift 22.2%Day 6: lift 11.1%Day 7: lift 11.1%Day 8: lift 22.2%Day 9: lift 11.1%Day 10: lift 11.1%Day 11: lift 22.2%Day 13: lift 11.1%Day 14: lift 22.2%Day 16: lift 11.1%Day 17: lift 22.2%Day 19: lift 11.1%Day 20: lift 22.2%Day 22: lift 11.1%Day 23: lift 22.2%Day 25: lift 11.1%Day 26: lift 22.2%Day 28: lift 11.1%Day 29: lift 22.2%
ExposedHoldoutDaily lift
Exit rules
Exited before send
162
12.0% of exposed

Users who would have received a send but exited early. Purchase, unsubscribe, or another exit rule. This is suppression, not loss.

Conversion + lift
Exposed rate
23.04%
311 converted
Holdout rate
15.33%
23 converted
Lift
50.2%
vs. holdout

Exposed group converted at 23.04% (311 of 1,350), while the randomly assigned control group converted at 15.33% (23 of 150). Absolute difference: +7.7 pts (95% CI +1.5 to +13.9 pts, two-tailed p = 0.031; confidence: high).

Illustrative 30-day cohort: 162 exposed shoppers exited before the 2-hour email (135 purchased on their own, 27 emptied their cart or unsubscribed). Randomized holdout lift includes all 1,350 exposed vs 150 holdout entries.
How these numbers are computed

Randomized holdout comparison. Everyone who qualifies is split at entry between the exposed group and the silent control group, so the difference measures causal lift rather than organic self-conversions.

Attribution window. Conversions count if they happen within the journey's goal window (default 7 days from entry, plus any configured post-exit window).

Multi-journey overlap. When two journeys qualify for the same purchase and either sets a priority, Apex credits the highest-priority journey (breaking ties by most recent exposure).

Clean cohort counts. Failed, manually stopped, or timed-out runs are excluded from both exposed and control totals so delivery errors do not skew the rate.

Interactive preview · Shopper timelines

Compare an early self-converter against a recovered cart.

Apexapex / customers / claire.bennett@example.com

Claire Bennett

claire.bennett@example.com

$74

Shopify SH-8419

Illustrative timeline: Claire Bennett added two items to her cart and completed Shopify order SH-8419 42 minutes later. Apex received purchase_completed, cleared her cart state, and exited her from the journey before the 2-hour email fired.

Exit-before-send log

  1. Journey exitedMay 22, 2026, 3:42 PM
  2. PurchaseMay 22, 2026, 3:41 PM
  3. Add to cartMay 22, 2026, 2:59 PM

    /products/ethiopia-yirgacheffe · $74.00

The complete playbook

Step-by-step setup, worked math, and real limits.

Follow the steps below, check how this interacts with tools you already run, and inspect live Apex pricing before turning anything on.

The short answer (native method)

Shopify includes a built-in abandoned checkout email, and tools like Klaviyo offer prebuilt cart flows. Both recover orders, but neither runs a randomized holdout by default, so they credit themselves for shoppers who would have returned and purchased anyway. Always disable overlapping native cart emails before launching a new flow.

How Apex automates it

Apex receives cart events from a sandboxed Shopify Custom Pixel, exits shoppers cleanly before sending if a completed order arrives during the wait window, and measures true incremental orders with a built-in 10% randomized holdout and 95% confidence interval.

How to set this up in 4 steps

  1. Pause overlapping Shopify or Klaviyo abandoned cart emails

    Before publishing in Apex, turn off Shopify's built-in abandoned checkout automation (and any Klaviyo or Mailchimp abandoned cart flow) so shoppers never receive two competing reminders for the same cart.

  2. Connect Shopify and add a sandbox-safe Shopify Custom Pixel

    Authorize Shopify in Apex Integrations (including protected customer data permissions for customer email) and add a Shopify Customer Events Custom Pixel that posts product_added_to_cart (using cartLine.cost.totalAmount), product_removed_from_cart, and checkout_contact_info_submitted directly to Apex's /api/events endpoint using event.clientId.

  3. Configure exit rules and repeat-cart re-entry limits

    In Apex Adaptive Journeys, add a 2-hour wait after cart activity, set exit rules on purchase_completed, emptied cart, and unsubscribe, and set a 7-day re-entry cooldown so shoppers adding items across multiple sessions aren't spammed.

  4. Enable a 10% randomized holdout and review Calibrated Impact

    Publish the journey with a 10% silent holdout group. Compare total exposed vs holdout conversion rates and the 95% confidence interval in Calibrated Impact before scaling follow-up touches or discounts.

What you already have (and what to turn off first)

Before turning on an Apex Abandoned Cart Journey, disable Shopify's built-in abandoned checkout automation (Marketing -> Automations) and any active Klaviyo or Mailchimp abandoned cart flow. Running two cart flows at once sends duplicate reminders and irritates shoppers.

Pause overlapping cart emails before publishing

Shopify's native abandoned checkout email works out of the box with zero extra setup, and email tools like Klaviyo offer solid prebuilt cart flows. Where both leave blind spots is incrementality:

  • Click-attributed revenue overstates email impact. Many shoppers who abandon a cart are simply interrupted and come back to buy within a few hours on their own. Without a randomized silent holdout group, standard email dashboards take credit for every order placed after an email opens or clicks.

  • Checkout-only triggers miss earlier cart intent. Shopify's built-in abandoned checkout automation only fires after a shopper reaches checkout and enters an email. Tracking add_to_cart and remove_from_cart for already-identified shoppers catches earlier intent while still verifying live cart contents before sending.

Tracking carts with Shopify Web Pixels and exit rules

Shopper pausing over a mobile shopping cart at a bright wooden desk beside a cup of coffee

Many distracted shoppers return and finish checkout within the first two hours on their own. Waiting two hours and exiting on purchase_completed avoids emailing people who already bought.

Use Shopify Web Pixels (Settings -> Customer events -> Add custom pixel) rather than brittle theme Liquid edits. Because Shopify Custom Pixels execute inside a strict sandboxed Web Worker where window.apex does not exist, post events directly to Apex's public ingest endpoint using fetch(..., { keepalive: true }), pass Shopify's event.clientId as anonymousId, and stitch email identity when checkout_contact_info_submitted fires:

// Settings -> Customer events -> Add custom pixel (strict sandbox; no window.apex)
const APEX_KEY = "YOUR_APEX_WORKSPACE_KEY";

function sendToApex(payload: Record<string, unknown>) {
  fetch("https://app.apex.inc/api/events", {
    method: "POST",
    keepalive: true,
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({ workspaceKey: APEX_KEY, ...payload }),
  });
}

analytics.subscribe("product_added_to_cart", (event) => {
  const line = event.data.cartLine;
  if (!line) return;
  sendToApex({
    anonymousId: event.clientId,
    event: "add_to_cart",
    properties: {
      product_id: line.merchandise.product.id,
      variant_id: line.merchandise.id,
      quantity: line.quantity,
      value: Number(line.cost?.totalAmount?.amount ?? line.merchandise.price.amount),
      currency: line.cost?.totalAmount?.currencyCode ?? line.merchandise.price.currencyCode,
    },
  });
});

analytics.subscribe("product_removed_from_cart", (event) => {
  const line = event.data.cartLine;
  if (!line) return;
  sendToApex({
    anonymousId: event.clientId,
    event: "remove_from_cart",
    properties: {
      product_id: line.merchandise.product.id,
      variant_id: line.merchandise.id,
      quantity: line.quantity,
      currency: line.merchandise.price.currencyCode,
    },
  });
});

analytics.subscribe("checkout_contact_info_submitted", (event) => {
  const email = event.data.checkout?.email;
  if (!email) return;
  sendToApex({
    anonymousId: event.clientId,
    userId: email,
    event: "identify",
    properties: { email },
  });
});

Exit rules and re-entry cooldowns

  • Exit before send on purchase_completed: During the 2-hour wait window, if Shopify delivers a completed order webhook for that customer, Apex clears their cart state and exits them from the journey before any email dispatches.

  • Exit on empty cart or unsubscribe: Shoppers who remove every item from their cart or opt out of marketing email also exit prior to dispatch.

  • 7-day re-entry cooldown: Restrict each contact to one active journey run at a time plus a 7-day cooldown so a shopper browsing across two consecutive evenings does not get stacked cart reminders.

Worked 30-day holdout example (illustrative assumptions)

All figures below are illustrative assumptions for the same fictional specialty coffee store (Roast & Anchor Coffee, $68 average order value, ~600 monthly Shopify orders) evaluating 1,500 abandoned carts over 30 days split randomly at entry (90% exposed, 10% silent holdout):

Cohort stage (30-day window)Exposed (90%)Silent holdout (10%)Reconciliation note
Abandoned carts entering journey1,3501501,500 total randomized entries
Purchased on their own during 2h wait (illustrative)135 (10.0%)15 (10.0%)Exited exposed group before send (0 emails)
Emptied cart or unsubscribed during 2h wait27 (2.0%)0 emailsTotal exited before send = 162 (135 + 27)
Shoppers sent the 2h reminder1,18801,350 - 162 = 1,188 emails dispatched
Post-wait conversions (within 7 days)1768Captured via Shopify purchase_completed
Full randomized 7-day conversion rate23.04% (311 / 1,350)15.33% (23 / 150)+7.7 pts lift (95% CI: +1.5 to +13.9 pts, p = 0.031)
Roast & Anchor Coffee bags packed in kraft shipping boxes lined up on a sunny packing bench ready for dispatch

Only orders above the silent 10% holdout baseline count as incremental recovered revenue. In this illustrative 30-day cohort, that equals roughly 20 to 188 net additional shipped orders.

How to read the randomized lift honestly:

  • Compare the entire randomized exposed cohort ({props.fixture.cohort.exposedConvertedTotal} / {props.fixture.cohort.exposedTriggered.toLocaleString("en-US")} = {(props.fixture.stats.exposedRate * 100).toFixed(2)}%) against the entire randomized holdout cohort ({props.fixture.cohort.holdoutConvertedTotal} / {props.fixture.cohort.holdoutTriggered} = {(props.fixture.stats.holdoutRate * 100).toFixed(2)}%) so early self-converters ({props.fixture.cohort.exposedSelfConvertedBeforeSend} exposed, {props.fixture.cohort.holdoutSelfConvertedBeforeWait} holdout, an illustrative 10% assumption) are counted identically on both sides.
  • Absolute incremental lift: +{(props.fixture.stats.absoluteLift * 100).toFixed(1)} percentage points (95% confidence interval: +{(props.fixture.stats.ci95Low * 100).toFixed(1)} to +{(props.fixture.stats.ci95High * 100).toFixed(1)} percentage points, two-tailed p = {props.fixture.stats.pValue.toFixed(3)}).
  • Estimated incremental recovered orders over 30 days: point estimate 104 orders, with a 95% confidence interval of 20 to 188 orders.
  • Estimated incremental gross revenue at $68 AOV: point estimate $7,072 / mo (95% CI: $1,360 to $12,784 / mo). Evaluate net profit against your actual gross margin and any discount offered in the reminder. Once buyers convert, pair this flow with our Meta Ads recent buyer exclusion playbook so recovered customers stop seeing cold acquisition ads immediately.

Live Apex pricing for this workflow

The pricing block below reads directly from Apex's live rate card for {props.fixture.apexUsage.monthlyCartEvents.toLocaleString("en-US")} monthly cart/order events, {props.fixture.apexUsage.monthlyOrchestrations.toLocaleString("en-US")} journey orchestrations, and {props.fixture.apexUsage.monthlyEmailsSent.toLocaleString("en-US")} dispatched emails (after suppressing {props.fixture.cohort.exposedExitedBeforeSend} early exits before send).

Live Apex pricing · Pay-as-you-go

Estimated Apex cost for 1,500 abandoned carts / 30 days (1,188 emails sent)

$0 / month

Fully inside Apex's free monthly allowances (resets every calendar month).

Apex meterScenario volumeFree monthly allowanceOverage rateApex cost
Events
Shopify Custom Pixel cart additions, removals, checkout contact events, and completed order webhooks
8,400 / mo1M / month$5 per 100K (per unit)$0
Orchestrations
1,500 randomized holdout assignments + 334 7-day conversion evaluations
1,812 / mo1M / month$5 per 100K (per unit)$0
Messages
1,188 cart reminder emails sent (162 early buyers/exits suppressed before dispatch)
1,188 / mo10K / month$60.00 per 100K (per unit)$0

The Shopify connector, Adaptive Journeys holdouts, and unlimited team seats carry no extra Apex fee. Individual event history stays queryable for 13 months without a card, 3 years with a card on file, and 7 years once you've paid an invoice. See the live pricing page.

Third-party and campaign costs (not paid to Apex)

ExpenseTypical rangeNotes
Shopify subscriptionExisting planPaid directly to Shopify; Web Pixels (Customer events) are included on all Shopify plans.
Sending domain DNS verification$0Standard DKIM/SPF records on your existing store domain so reminders land in the primary inbox.

Limitations and Shopify prerequisites

  • Shopify protected customer data approval: Custom Shopify apps that read customer email addresses on orders require Shopify's protected customer data access approval before syncing live customer profiles.

  • Anonymous carts cannot receive email: A first-time visitor who adds an item to their cart without signing in or entering an email at checkout cannot be emailed until they identify themselves.

  • Holdouts need sample size before calling a winner: Smaller stores with 100 to 200 abandoned carts per month will need several weeks to narrow the 95% confidence interval. Do not treat an early low-sample read as proof of lift.

  • Consistent purchase event naming: Use one canonical event (purchase_completed) across both the Shopify connector and your journey goal/exit rules so orders clear carts and count toward holdout lift consistently.

For your web developer or AI editor

Wire exit-safe Shopify cart recovery through Apex MCP.

Connect Apex MCP in Cursor, VS Code, or Claude Code, then paste the prompt below. Your agent inspects your Shopify storefront pixel and existing journeys first, asks before publishing emails, and reminds you to pause conflicting Shopify or Klaviyo flows.

1Add Apex to your editor

Install in Cursor

Opens Cursor and adds Apex. Nothing to configure.

2Tell your agent

Paste this prompt into your AI editor (scroll to read full prompt)

Inspect this codebase and my connected Apex workspace before changing anything. Check existing Shopify connections, verified sender domains, and any active cart journeys so we don't create duplicates. Then propose a plan to: (1) connect Shopify via OAuth if not already connected, (2) generate a sandboxed Shopify Custom Pixel (posting directly to https://app.apex.inc/api/events with event.clientId, NOT window.apex) subscribing to product_added_to_cart (using cartLine.cost.totalAmount.amount), product_removed_from_cart, and checkout_contact_info_submitted (identify email), (3) build a draft Abandoned Cart Adaptive Journey with a 2-hour wait, purchase_completed exit rule, 7-day re-entry cooldown, and a 10% randomized holdout, and (4) pause before publishing so I can confirm Shopify's native abandoned checkout email and any Klaviyo cart flow are turned off first. Report what is wired, what is in draft, and what manual Shopify Admin steps remain.

The first time your agent calls Apex, it gives you a link to approve in the browser. There is no key to paste. In Cursor you can also run /setup-apex.

See how editor setup works step by step

roast-and-anchor-store · CursorWaiting for approval
Agent
You

Inspect our workspace and draft an exit-safe Shopify cart recovery journey.

Set up Apex · 0 of 2
  • Shopify connected
  • Sandboxed Shopify Custom Pixel prepared
  • Exit-safe journey drafted (10% holdout)
  • Native Shopify/Klaviyo cart emails paused

Your move

Prove which cart reminders actually create new orders.

Connect Shopify, suppress emails for shoppers who already checked out, and measure true incremental revenue with a built-in 10% holdout.