Skip to main content
Attribute
Back to Blog
How ToUpdated September 17, 2025

How to Track Cart Abandonment in Google Analytics 4 (GA4)

GA4 tracks e-commerce events, not abandonment directly. To track cart abandonment: verify e-commerce events are firing (add_to_cart, begin_checkout, purchase), build funnel explorations to see drop-off points, calculate abandonment rate from event data, and segment by device, source, and user type to find actionable patterns.

Attribute Team
E-commerce & Shopify Experts
September 17, 2025
6 min read
Track Cart Abandonment in Google - how-to article about how to track cart abandonment in google analytics 4 (ga4)

Google Analytics 4 tracks e-commerce events differently than Universal Analytics did. If you've migrated to GA4 and lost visibility into cart abandonment, you're not alone. The good news: GA4 actually provides more powerful abandonment tracking once you set it up correctly.

This guide walks through the exact setup for tracking cart abandonment in GA4, from basic implementation to advanced analysis.

Understanding GA4 E-commerce Events

GA4 uses an event-based model. For cart abandonment, you need these events firing correctly:

Core E-commerce Events:

| Event | When It Fires | What It Tracks | |-------|---------------|----------------| | view_item | Product page view | Product interest | | add_to_cart | Item added to cart | Purchase intent | | begin_checkout | Checkout started | High intent | | add_payment_info | Payment entered | Very high intent | | purchase | Order completed | Conversion |

Cart abandonment is measured as the gap between add_to_cart events and purchase events. Checkout abandonment is the gap between begin_checkout and purchase.

Step 1: Verify E-commerce Tracking Is Working

Before building abandonment reports, confirm your events are firing.

Check in GA4 DebugView

  1. Install the Google Analytics Debugger Chrome extension
  2. Enable debug mode in your store
  3. Go to GA4 > Configure > DebugView
  4. Add items to cart and go through checkout
  5. Verify you see: add_to_cart, begin_checkout, add_payment_info, purchase

Check in Real-Time Reports

  1. Go to GA4 > Reports > Real-Time
  2. Add items to cart in an incognito window
  3. Look for events appearing in the Event count section

Shopify-Specific Setup

If you're using Shopify's native GA4 integration:

  1. Go to Online Store > Preferences
  2. Enter your GA4 Measurement ID (G-XXXXXXX)
  3. Enable Enhanced Ecommerce

If using Google & YouTube channel app:

  1. The app automatically sends e-commerce events
  2. Verify in GA4 that events are appearing

Common issue: Some theme customizations or third-party apps can break event tracking. Test in a clean browser with no extensions.

Step 2: Build a Cart Abandonment Funnel

GA4's funnel exploration shows you exactly where customers drop off.

Creating the Funnel

  1. Go to GA4 > Explore > Funnel Exploration
  2. Click "Create new exploration"

Configure Steps

Add these steps in order:

Step 1: Add to Cart

  • Event: add_to_cart

Step 2: Begin Checkout

  • Event: begin_checkout

Step 3: Add Payment Info

  • Event: add_payment_info

Step 4: Purchase

  • Event: purchase

Reading the Funnel

The funnel shows:

  • Completion rate at each step
  • Abandonment rate between steps
  • Time between steps

Example output:

  • Add to Cart: 1,000 users (100%)
  • Begin Checkout: 350 users (35% continued)
  • Add Payment Info: 280 users (28% continued)
  • Purchase: 250 users (25% completed)

This tells you:

  • 65% abandon before even starting checkout (cart abandonment)
  • 10% abandon during checkout before payment
  • 3% abandon after entering payment

Step 3: Calculate Your Abandonment Rate

Cart Abandonment Rate

Formula: (Add to Cart Events - Purchases) ÷ Add to Cart Events × 100

In GA4, create a calculated metric:

  1. Go to Admin > Custom Definitions > Calculated Metrics
  2. Create new calculated metric:
  • Name: Cart Abandonment Rate
  • Formula: (Event count (add_to_cart) - Event count (purchase)) / Event count (add_to_cart)

Or calculate manually from standard reports:

  1. Go to Reports > Engagement > Events
  2. Note add_to_cart event count
  3. Note purchase event count
  4. Calculate: (addtocart - purchase) / addtocart × 100

Checkout Abandonment Rate

More actionable because these users showed higher intent.

Formula: (Begin Checkout Events - Purchases) ÷ Begin Checkout Events × 100

If 350 users began checkout and 250 purchased: (350 - 250) ÷ 350 × 100 = 28.5% checkout abandonment

Step 4: Segment Abandonment Data

Aggregate abandonment rates hide actionable insights. Segment to find patterns.

By Device

  1. In your funnel exploration, add "Device category" as a breakdown
  2. Compare mobile vs. desktop abandonment

Typical finding: Mobile abandonment is 10-15% higher than desktop. This indicates checkout optimization opportunities.

By Traffic Source

  1. Add "Session source/medium" as a breakdown
  2. Compare abandonment across channels

What to look for:

  • Paid social often has higher abandonment (lower intent traffic)
  • Organic search and direct typically have lower abandonment
  • Email should have lowest abandonment

By New vs. Returning Users

  1. Add "New / returning" as a breakdown
  2. Compare abandonment patterns

Typical finding: New users abandon more. They don't trust you yet.

By Product Category

If you have enhanced e-commerce with item categories:

  1. Create exploration using item_category dimension
  2. See which product types have highest abandonment

Step 5: Identify Where They Drop Off

Checkout Step Analysis

If you're tracking checkout steps with custom events, you can see exact drop-off points:

Custom events to implement:

` checkoutstepshipping - When shipping form appears checkoutsteppayment - When payment form appears checkoutstepreview - When order review appears `

Then build a funnel with these granular steps.

Common Drop-Off Points

Cart → Checkout (65% typical drop)

  • Just browsing, saving for later
  • Unexpected shipping cost preview
  • Account creation requirement

Checkout → Payment (10-15% typical drop)

  • Shipping costs revealed
  • Delivery time too slow
  • Complex form fields

Payment → Purchase (3-5% typical drop)

  • Payment declined
  • Changed mind at final moment
  • Technical error

Step 6: Set Up Abandonment Alerts

Get notified when abandonment spikes.

Create a Custom Alert

  1. Go to Admin > Custom Definitions > Custom Alerts
  2. Create new alert:
  • Name: High Cart Abandonment
  • Condition: When add_to_cart events increase by more than 50% AND purchase events decrease by more than 20%
  • Notification: Email

What to Monitor

Create alerts for:

  • Cart abandonment rate spike (indicates site issues)
  • Checkout abandonment spike (indicates checkout problems)
  • Payment failure increase (indicates processor issues)

Step 7: Connect Abandonment Data to Actions

Data without action is overhead. Here's how to use abandonment insights.

Finding Abandonment Reasons

Combine GA4 data with:

Session recordings (Hotjar, Lucky Orange)

  • Watch sessions that abandoned at each step
  • See what users did before leaving

Exit surveys

  • Trigger popup on cart/checkout exit
  • Ask "What stopped you from completing your purchase?"

Checkout field analysis

  • Use form analytics to see where users hesitate
  • Identify confusing fields

Prioritizing Fixes

Focus on:

  1. High-volume, high-abandonment steps
  • If 1,000 users hit cart and 650 abandon, that's a bigger opportunity than a step with 100 users and 50% abandonment
  1. Recent increases
  • New abandonment is often caused by something you changed
  • Compare current period vs. previous period
  1. Device-specific issues
  • If mobile abandonment is 80% but desktop is 60%, prioritize mobile checkout

Testing Improvements

  1. Identify hypothesis from data (e.g., "Shipping cost surprise causes abandonment")
  2. Implement fix (show shipping estimate on product page)
  3. Run A/B test or monitor before/after
  4. Verify improvement in GA4 funnel

Advanced: Abandoned Cart Audience for Remarketing

Create an audience of cart abandoners for Google Ads remarketing.

Building the Audience

  1. Go to Admin > Audiences > New Audience
  2. Create custom audience:
  • Name: Cart Abandoners
  • Condition: Users who triggered add_to_cart event
  • Exclude: Users who triggered purchase event
  • Membership duration: 7 days (adjust based on your purchase cycle)

Creating Checkout Abandoner Audience

Higher-intent audience for more aggressive remarketing:

  • Condition: Users who triggered begin_checkout event
  • Exclude: Users who triggered purchase event
  • Membership duration: 3 days

Using in Google Ads

  1. Link GA4 to Google Ads
  2. Import audiences to Google Ads
  3. Create remarketing campaigns targeting these audiences
  4. Use dynamic remarketing to show specific products they abandoned

Troubleshooting Common Issues

Events Not Appearing

Check:

  1. Measurement ID correct?
  2. Tracking code installed on all pages?
  3. Any ad blockers or privacy extensions blocking?
  4. Consent mode blocking events?

Duplicate Events

Symptoms: Event counts seem too high

Causes:

  • Multiple tracking implementations firing
  • Enhanced e-commerce and custom events both active
  • Page refreshes firing events again

Fix: Use Tag Manager to control event firing logic

Purchase Events Not Matching Orders

Common causes:

  • Thank you page not loading (redirect issues)
  • Payment confirmation not triggering event
  • Currency or value format issues

Fix: Compare GA4 purchase events to Shopify orders; debug discrepancies in DebugView

Funnel Shows 0% at All Steps

Likely cause: Events aren't configured as conversions or exploration isn't set up correctly

Fix: Verify event parameters include required e-commerce data (value, currency, items array)

Frequently Asked Questions

Does GA4 track cart abandonment automatically?

GA4 tracks events, not abandonment directly. You need to set up e-commerce events, then build funnels or reports that calculate abandonment from the event data.

What's the difference between cart and checkout abandonment in GA4?

Cart abandonment: Users who triggered add_to_cart but not purchase. Checkout abandonment: Users who triggered begin_checkout but not purchase. Checkout abandonment represents higher-intent users.

How accurate is GA4 abandonment tracking?

It depends on implementation. Common accuracy issues: ad blockers preventing tracking (~10-15% of users), consent mode excluding some users, mobile app vs. web tracking gaps.

Can I see which products were abandoned?

Yes, if your add_to_cart events include the items array with product details. Create an exploration with item_name dimension filtered to add_to_cart events without corresponding purchase events.

Should I use GA4 or a dedicated cart abandonment tool?

Use both. GA4 for analysis and understanding patterns. Dedicated tools (Klaviyo, Shopify native, etc.) for recovery automation. GA4 tells you what's happening; recovery tools help you fix it.

Sources & References

Written by

Attribute Team

E-commerce & Shopify Experts

The Attribute team combines decades of e-commerce experience, having helped scale stores to $20M+ in revenue. We build the Shopify apps we wish we had as merchants.

11+ years Shopify experience$20M+ in merchant revenue scaledFormer Shopify Solutions ExpertsActive Shopify Plus ecosystem partners