---
name: optimize-cart-and-checkout-flow
description: >-
  Finds and fixes the revenue leaks between add-to-cart and payment: measure the funnel step by step in
  GA4, locate where buyers abandon, then remove the classic killers - surprise shipping costs, forced
  account creation, bloated forms, missing express-pay - and prove the recovery against a baseline. Use
  it when cart abandonment runs above ~70% or checkout abandonment above ~50%, when add-to-cart is
  healthy but purchases are disproportionately low, after a platform migration, or after pricing/
  shipping policy changes. VigilDog's role is measurement: ga4_run_report, ga4_run_pivot_report, and
  ga4_batch_run_reports quantify drop-off by step and device; every page change is human web work. If
  the weakness is upstream - visitors not adding to cart at all - go to
  build-a-high-converting-product-page or build-a-high-converting-ecommerce-landing-page instead; this
  skill starts where the cart begins.
---
# Cart and Checkout Flow Optimization

## Purpose

Cart and checkout are one sequential flow, and friction anywhere in it blocks the same outcome: a
completed order. This skill measures exactly where buyers fall out of that flow, ranks the causes by
recovered revenue, drives the page fixes, and verifies abandonment actually dropped. It is the
downstream partner of the page-building skills - run it when the product page is doing its job and
the funnel after it is not.

## When to run

- Cart abandonment exceeds roughly 70% (the typical range is 65-75%; above it you have a fixable
  problem).
- Checkout abandonment (started checkout, didn't finish) exceeds roughly 50%.
- Add-to-cart rate looks healthy while purchase rate lags disproportionately.
- A new store launch or platform migration - flows break silently in migrations.
- After changes to pricing, shipping costs, or return policy - each shifts the abandonment math.

## When NOT to run

- Visitors rarely add to cart in the first place - the leak is upstream →
  build-a-high-converting-product-page (PLA/product traffic) or
  build-a-high-converting-ecommerce-landing-page (dedicated promo LPs).
- The destination is a lead-gen/SaaS form, not a cart → audit-and-optimize-an-existing-landing-page.
- Pricing, shipping policy, or the returns offer themselves need changing - those are business
  decisions to settle before optimizing their presentation.
- Payment-processor selection or integration debugging - engineering work outside this scope.

## Prerequisites

- GA4 ecommerce events implemented and trustworthy: add_to_cart, view_cart, begin_checkout,
  add_shipping_info, add_payment_info, purchase. Without step events, drop-off cannot be located.
- Access to the live cart and checkout pages and to whoever can change them.
- Documented shipping structure (cost, free threshold, delivery times), return policy, and enabled
  payment methods.
- Knowledge of whether an abandoned-cart email flow exists.

## Procedure

1. **Measure the funnel.** Use `ga4_batch_run_reports` to pull, in one call: event counts for
   add_to_cart, view_cart, begin_checkout, add_shipping_info, add_payment_info, and purchase over the
   last 30 days. Compute step-to-step conversion and the two headline rates: cart abandonment
   (carts that never reach checkout) and checkout abandonment (checkouts that never purchase).
2. **Cut by device.** Use `ga4_run_pivot_report` with funnel steps against device category. A
   mobile-only collapse at the form step is a different fix than a universal collapse at shipping.
3. **Add revenue context.** `ga4_run_report` for AOV and purchase revenue - the baseline that later
   proves the fixes paid for themselves. Save all step rates, split by device, as the dated "before"
   snapshot.
4. **HUMAN STEP (outside VigilDog):** walk the live flow as a buyer, on a phone: add an item, open the
   cart, proceed, fill the form, reach payment. Document every screen: what happens on add-to-cart,
   whether totals include shipping, whether checkout demands an account, how many fields the form
   has, which payment methods show, what the confirmation looks like.
5. **Locate the leak.** Match the step data (steps 1-2) to the walkthrough (step 4): a cart→checkout
   drop points at cart-page friction or missing cost transparency; a checkout-start→payment drop
   points at form friction, account walls, or payment gaps; a payment→purchase drop points at
   payment errors or last-second doubt.
6. **Prioritize by abandonment force:** direct blockers first (forced registration, costs that first
   appear at checkout, no guest option), heavy friction second (no shipping estimate in cart,
   aggressive coupon field, no inline validation), confidence/AOV items third (trust badges,
   cross-sell, CTA copy), polish last.
7. **HUMAN STEP (outside VigilDog):** fix the cart page - line items with variant-matching thumbnails
   and clear totals; a shipping estimate on the cart page, never "calculated at checkout" as the only
   answer; quantity edits without reload and remove-with-undo; a free-shipping progress indicator
   when a threshold exists; 2-3 complementary low-cost cross-sells (suggest one that clears the
   threshold); the coupon input collapsed behind a text link; a checkout CTA at top and bottom with
   express-pay buttons and a one-line returns reminder.
8. **HUMAN STEP (outside VigilDog):** fix checkout access - guest checkout as the default path, email
   as the first field (enables recovery emails on abandonment), express-pay options above the form,
   login available but never blocking.
9. **HUMAN STEP (outside VigilDog):** fix the form - delete every field not strictly required to
   fulfill the order; single-column layout; smart defaults (country from IP, city from postal code,
   billing-equals-shipping pre-checked); inline validation as fields are completed, not at submit;
   correct mobile keyboards per field type.
10. **HUMAN STEP (outside VigilDog):** fix cost transparency and payment - order summary persistently
    visible (sidebar on desktop, collapsible on mobile) with item thumbnails; the checkout total
    identical to the cart total, no new charges appearing; card + PayPal + at least one
    market-relevant method; installment options for higher-priced carts with the per-installment
    price shown; navigation stripped, security cue near payment fields, guarantee line near the
    order button, and button copy that states the action and amount.
11. **HUMAN STEP (outside VigilDog):** re-test end to end on a real phone: guest purchase, express-pay
    purchase, abandon-at-email to confirm the recovery email fires, confirmation page loads.
12. **Verify with data.** After 2 weeks of post-change traffic, re-run steps 1-3 and compare against
    the snapshot. Targets: cart abandonment down 5-15% relative, checkout abandonment down 10-20%
    relative, AOV up 5-10% from cross-sell and threshold nudges. Steps still leaking → return to
    step 5 for that step only. Flow healthy → scale traffic and route upstream growth to the
    campaign skills.

## Decision rules

- **Trigger thresholds:** cart abandonment > 70% or checkout abandonment > 50% justifies this skill;
  within normal ranges, upstream work usually pays better.
- **The #1 killer is surprise cost.** Any charge the buyer first sees at checkout - shipping, tax,
  fees - is the leading abandonment driver; estimates on the cart page are non-negotiable.
- **Guest checkout is the default,** not an option hidden under the login form. Forced registration
  is a direct blocker, priority one.
- **Email field first,** so every abandonment after it is recoverable by email.
- **Coupon fields stay subdued:** a prominent code box sends full-price buyers off to hunt for codes;
  collapse it.
- **Cart total must equal checkout total.** Any mismatch reads as a bait-and-switch.
- **Installments for bigger carts:** once orders meaningfully exceed ~50 in your currency, a
  pay-later option with visible installment pricing recovers price-sensitive buyers.
- **Judge changes after 2+ weeks** of data, not days - weekly cycles and promo noise dominate short
  windows.

## Common failure modes

- **Optimizing the checkout while the cart hides shipping.** Buyers abandon before the beautiful new
  form ever loads; fix cost transparency first.
- **Trusting event data that was never validated.** A missing begin_checkout tag makes the funnel
  look broken at the wrong step; sanity-check event counts against order counts before diagnosing.
- **Desktop-only fixes.** Form friction is overwhelmingly a mobile phenomenon (keyboards, tap
  targets, viewport); every fix gets verified on a phone.
- **Shipping every change at once with no baseline.** Without the step-3 snapshot you cannot prove
  recovery or attribute it; snapshot, then batch.
- **Treating symptoms of a pricing problem.** If shipping costs are simply uncompetitive, no UX fix
  compensates; flag the policy question to the business instead of polishing around it.

## Related skills

- **Upstream:** build-a-high-converting-product-page, build-a-high-converting-ecommerce-landing-page
  (they fill the cart this skill protects).
- **Monitoring:** monitor-landing-page-performance (recurring sweep that spots the
  add-to-cart-vs-purchase divergence), run-a-weekly-performance-review.
- **Measurement foundations:** set-up-google-ads-conversion-tracking, set-up-cart-data-and-profit-tracking
  (cart-level value data enriches the ROAS picture once the flow converts).
