954-539-5678Free audit
Menu

E-commerce · Analytics

Set up GA4 ecommerce tracking you can trust

Send the right events with one integration, test the purchase event, then reconcile GA4 revenue with your store every month.

Use one integration, not two

Test purchase in DebugView

Reconcile revenue monthly

Talk to us

Tell us what you need and we’ll get back to you. Or book a free 30-minute call. Or call 954-539-5678.

The short answer

To set up GA4 ecommerce tracking, send Google Analytics the recommended ecommerce events, from product views to purchase, with a unique transaction ID, the order value, the currency and an items array. The easiest route is your platform’s official integration: the Google & YouTube app on Shopify or the free Google Analytics for WooCommerce extension. Use Google Tag Manager and a data layer when you need more control.

Then check the numbers. Compare GA4 revenue and order counts with your store’s own reports for the same dates. Some gap is normal. A large or sudden gap means something is broken, and the steps below show how to find it.

The events GA4 expects

Google’s developer documentation lists these recommended ecommerce events. You do not need every one on day one, but the core purchase path should be complete:

  • Browsing: view_item_list, select_item, view_item.
  • Cart: add_to_cart, remove_from_cart, view_cart, add_to_wishlist.
  • Checkout: begin_checkout, add_shipping_info, add_payment_info.
  • Outcome: purchase and refund.
  • Promotions: view_promotion and select_promotion, if you run on-site banners.

The purchase event is the one that matters most. It should include transaction_id (Google notes it is required for purchases and refunds), value, currency (set at the event level whenever you send value) and items, which can hold up to 200 products. Tax, shipping and coupon are optional but useful.

Three ways to set it up

Shopify: Google & YouTube app

Create a GA4 property and web data stream, copy the tag ID, and connect it through the Google & YouTube sales channel. No theme code is needed, and Shopify points you to Google’s own Shopify setup guide to finish.

WooCommerce: official extension

Google Analytics for WooCommerce is free, adds ecommerce events for product views and cart actions, and supports the cart and checkout blocks.

Google Tag Manager + data layer

Your developer pushes ecommerce events to the data layer and GTM forwards them to GA4. Most flexible, and the right choice for custom stores, Magento and complex setups.

Pick one route and only one. The most common cause of inflated revenue is two systems sending the same purchase, for example the Shopify app plus a leftover GTM tag or a hard-coded snippet from a previous agency.

Decide what revenue means before you build

Agree one definition of value with whoever reads the reports, usually the owner and the bookkeeper, and write it down. The usual choice is product revenue after discounts, excluding tax and shipping, sent in the currency the customer paid. Send tax and shipping as their own parameters so you can still report on them.

Also decide how refunds are handled. If you send refund events, GA4 can show net revenue; if you do not, GA4 revenue will run higher than your net sales after returns. Either choice is fine, as long as the monthly comparison uses the same definition on both sides.

Setting up with Google Tag Manager

  1. Have the developer add data layer pushes for each event, using Google’s parameter names. Google’s examples clear the previous ecommerce object first with dataLayer.push({ ecommerce: null }), so items from one event do not leak into the next.
  2. Create a GA4 Event tag with the event name set to the Event variable, and under More Settings turn on ecommerce data with the data layer as the source.
  3. Add a Custom Event trigger that matches your ecommerce event names, such as purchase.
  4. Fire purchase only once. Make sure reloading the thank-you page or returning to it from an email does not send the order again.
  5. Preview and test before publishing.

On Shopify, tracking on checkout and post-purchase pages is done with pixels rather than theme code. Custom pixels load in a sandbox, and Shopify notes that adding and using custom pixels is unsupported by Shopify, so use the official app unless you have a specific reason not to.

How to test before you trust the data

  1. Turn on debug mode with Google Tag Assistant or GTM preview. Open DebugView under Admin, Data display in GA4.
  2. Walk the path: view a category, view a product, add to cart, start checkout, add shipping and payment, and complete a real low-value order.
  3. Check each event and its parameters. Confirm the purchase has the same order number as your store, the correct total and currency, and the right items and quantities.
  4. Refund the test order and confirm the refund event, if you send one.
  5. Exclude internal and developer traffic so test orders do not pollute reports.

Note that DebugView will not show events if consent mode is on and you have not accepted analytics cookies in your test browser.

Numbers not adding up?

Book a free 30-minute call. We look at your store and GA4 setup with you and tell you what we would fix first so your revenue reports can be trusted. No obligation. Pick a time.

Making GA4 revenue match your platform

GA4 will rarely match your store to the dollar. Your store records every order; GA4 records what the browser was allowed to send. Common reasons for a gap:

  • Consent. Under basic consent mode, tags do not fire at all for visitors who decline cookies. Advanced consent mode sends cookieless pings that let Google model some of the missing data, but modeled data is not the same as recorded orders.
  • Ad blockers and privacy browsers that block the Google tag.
  • Orders that never touch the storefront: draft orders, phone orders, point of sale, subscription renewals and marketplace orders.
  • Different definitions of revenue. Your platform report may include or exclude tax, shipping, discounts and refunds differently from the value you send.
  • Time zones and currencies. A GA4 property in a different time zone shifts orders across days. Multi-currency stores must send the currency actually charged.
  • Duplicates. Two tags, or a thank-you page that fires purchase again on reload.

A monthly reconciliation routine

  1. Pick a full month. Pull order count and revenue from your store, excluding tax and shipping, or matching however you send value.
  2. Pull purchases and purchase revenue from GA4 for the same dates and time zone.
  3. Compare order counts first, then revenue. If GA4 has more orders than the store, look for duplicates. If it has far fewer, look for consent, blocked tags or a broken checkout tag.
  4. Spot-check ten order numbers: search for each transaction ID in GA4 and see which are missing.
  5. Track the gap over time. A stable gap is something you can live with and explain. A gap that jumps after a theme change, an app install or a checkout update is a bug.

As a working rule, write down the gap you consider acceptable for your store and investigate whenever a month falls outside it. Clean tracking matters most when you spend on ads, because Google Ads bidding and reporting rely on accurate purchase data. For ways to turn the data into more sales, see our conversion rate optimization tips. Our web design team sets up GA4 on Shopify, WooCommerce, BigCommerce and Magento stores.

Book it now · Free

Book a free 30-minute call

Pick a time. We look at what you have now with you and tell you what we would change first. No obligation.

Prefer to talk now? Call 954-539-5678, or send the form and we’ll contact you.

Questions we hear

How do I set up GA4 ecommerce tracking on Shopify?

Create a GA4 property and web data stream, then connect its tag ID through Shopify’s Google & YouTube sales channel. Remove any older GA snippets or GTM purchase tags so orders are not counted twice.

Which parameters does the GA4 purchase event need?

Send transaction_id, value, currency and an items array. Google notes transaction_id is required for purchases and refunds, and currency should be set whenever you send value. Tax, shipping and coupon are optional.

Why doesn’t GA4 revenue match Shopify or WooCommerce?

Visitors who decline cookies, ad blockers, orders placed outside the storefront, different treatment of tax and shipping, time zones and duplicate tags all cause gaps. A stable small gap is normal; a sudden change means something broke.

Should I use Google Tag Manager for GA4 ecommerce?

Use your platform’s official integration if it covers what you need. Choose Tag Manager with a data layer for custom stores, Magento or when you need extra events and parameters.

How do I test GA4 ecommerce events?

Turn on debug mode with Tag Assistant or GTM preview, open DebugView in GA4, complete a real low-value order and check that the purchase event shows the right order number, total, currency and items.

Related services

Want a second opinion on your website or marketing?

Pick a time for my free callCall 954-539-5678