Google Analytics 4 Ecommerce Events: add_to_cart, begin_checkout, purchase
Three events carry the entire weight of your GA4 ecommerce funnel: add_to_cart, begin_checkout, and . They're part of GA4's recommended ecommerce event set, and together they track a shopper's path from the moment they add something to their cart through checkout initiation to a completed order. Miss one, and the funnel breaks.
purchase
All three rely on the same items array parameter, and the item_id or item_name values need to match across events. If your add_to_cart event calls a product "Blue T-Shirt - Large" and your purchase event calls it "BLUTSHIRT-L", GA4 won't connect the dots cleanly.
This guide covers the required parameters for each event, how to implement them through gtag.js, Google Tag Manager, and Shopify, and how to confirm they're actually firing before you trust a single number in your reports.
Why these three events matter for your funnel
These three events are the backbone of GA4's standard ecommerce purchase funnel report. Without them, you're flying blind on where shoppers actually drop off, whether that's at the cart, at checkout, or somewhere in between.
Here's the part people miss: GA4 can't calculate cart abandonment or checkout abandonment rates unless all three events fire consistently, with matching item data, on every session. One missing event and the funnel math just doesn't work. You'll see totals, but you won't see the story.
These events also aren't optional if you're running Google Ads. Conversion value tracking, ROAS calculations, and smart bidding strategies all pull from purchase event data. If that event is misconfigured, your ad platform is optimizing toward bad numbers without telling you.
add_to_cart: required parameters and example payload
The add_to_cart event needs three things to be useful: currency, value, and an items array containing item_id, item_name, price, and quantity for each product added.
A basic gtag.js implementation on an "Add to Cart" button click looks like this:
[@portabletext/react] Unknown block type "code", specify a component for it in the `components.types` prop
The most common mistake here is skipping currency or value. The event still fires, it still shows up in GA4's event count, and that's exactly what makes it dangerous. Nothing looks broken at a glance. But revenue-based reporting on that event goes to zero or gets excluded entirely, and you won't notice until someone asks why cart value trends look flat.
begin_checkout: required parameters and example payload
begin_checkout needs currency, value, and the items array, same shape as add_to_cart. An optional coupon parameter is worth including if discount codes matter to your reporting.
Timing trips people up more than the parameters do. This event should fire the moment a user actually lands on the checkout page, not when they click a "Checkout" button from the cart page. Those are two different moments, and conflating them inflates your checkout numbers while making the gap between cart and checkout look smaller than it is.
[@portabletext/react] Unknown block type "code", specify a component for it in the `components.types` prop
If your checkout has multiple steps, don't try to cram all of that into begin_checkout. GA4 has separate events, add_shipping_info and add_payment_info, built for exactly that. Use them to break out shipping and payment stages instead of overloading one event with step-tracking logic that doesn't belong there.
purchase: required parameters and example payload
The purchase event carries the most weight of the three, and it has the most required fields: transaction_id, value, currency, and the items array. tax and shipping are optional but worth adding if you want accurate net revenue figures.
[@portabletext/react] Unknown block type "code", specify a component for it in the `components.types` prop
transaction_id has to be unique per order. This is the one that gets people. Fire purchase on a thank-you page without deduplication logic, and a customer hitting refresh (or your own QA testing) can log the same order two or three times. GA4 won't catch that for you automatically in every configuration, so your revenue totals quietly inflate.
Purchase value is what flows directly into GA4's revenue reports, ROAS calculations, and Google Ads conversion tracking. If this event is wrong, every downstream number built on top of it is wrong too.
Implementation methods: gtag.js, Google Tag Manager, and Shopify
You've got two real options for getting these events onto a page: hand-coded gtag.js calls, or Google Tag Manager's data layer approach.
Manual gtag.js is fine for simple sites with a developer who's comfortable editing templates directly. GTM is usually the better call for anything more complex, because it separates tracking logic from your codebase. You push an ecommerce object into the dataLayer at each step (add to cart, checkout, purchase), and GTM triggers fire the GA4 events from there. Changes to tracking don't require a code deploy, which matters once more than one person touches the site.
Shopify complicates this a bit. Most merchants aren't hand-coding add_to_cart or purchase events into checkout pages anymore, since Shopify's checkout is locked down on most plans and editing it directly isn't really an option. These events typically get handled through Shopify's checkout extensibility framework or through an app that manages the data layer for you. If you're setting this up on Shopify, start with Trivas's Shopify integration guide rather than trying to inject scripts into checkout pages that Shopify controls.
Whichever method you use, don't publish anything without checking it first. GA4's DebugView and GTM's Preview mode both let you watch events fire in real time, with every parameter visible, before the change goes live to actual shoppers.
Common tracking errors and how to catch them
A handful of mistakes show up over and over in GA4 ecommerce setups:
Missing items array. The event fires, GA4 logs it, but there's no product data attached. Reports show the event count but zero revenue, which is confusing if you don't know what to look for.
Duplicate purchase events. Usually caused by missing transaction_id deduplication, triggered by page refreshes or back-button navigation landing back on the confirmation page.
Currency mismatches. If add_to_cart fires in USD but purchase somehow logs EUR (common with multi-region sites that don't pass currency dynamically), your funnel's revenue totals won't reconcile across stages.
None of these show up as errors in GA4's interface. They just quietly produce wrong numbers. The only real defense is checking GA4's Realtime report and DebugView immediately after any theme update, checkout change, or app install. Don't wait a week to notice revenue looks off, check it the same day you ship the change.
Turning GA4 events into funnel reporting that doesn't require manual QA
Getting these three events implemented correctly is half the job. The other half is actually turning that raw event data into a funnel view you can read at a glance, and GA4's interface doesn't make that easy. You're stuck building custom explorations or exporting data just to see cart-to-purchase drop-off next to what you spent on ads that day.
That's the gap Trivas's GA4 funnel dashboards are built to close. They're built on Redshift, pulling add_to_cart, begin_checkout, and purchase data into one view alongside Meta and Google ad spend, so you're not stitching together GA4's interface with your ads platform by hand every week.
If you want to see how these events map into pre-built reporting, the GA4 solutions page walks through it, and the data dictionary is worth a look if you want to see exactly how each metric gets defined before it hits a dashboard. Worth a browse even if you're just trying to sanity-check your current setup.
Content author and contributor at Trivas.ai, sharing insights on e-commerce analytics, business intelligence, and data-driven strategies to help businesses grow.
Continue Reading
explore more insights
Content Pruning Plan: Merge 'How to Build a Shopify Analytics Dashboard' Into the Shopify Pillar
3 min read
Omnichannel Analytics Software: What It Is and How to Choose One
3 min read
Best Triple Whale Alternative 2025: How to Choose (and Why Trivas Makes the List)