Measurement

GA4 Ecommerce Tracking Setup (2026): Purchase Events and Key Events

  • By Marpany
  • Published:
  • Updated:
  • 10 min read
GA4 Ecommerce Tracking Setup (2026): Purchase Events and Key Events

Short answer

GA4 ecommerce tracking means sending Google's recommended events (view_item, add_to_cart, begin_checkout, purchase) with an items array, giving every purchase a unique transaction_id plus value and currency, testing everything in DebugView, then confirming purchase is a key event (GA4 marks it by default) and importing it into Google Ads. Set up correctly, revenue fills the Monetization reports automatically.

Key takeaways

  • Use Google's recommended ecommerce event names; custom names leave the ecommerce reports empty.
  • Every purchase needs transaction_id, value, currency and items. If you send value, currency is required.
  • GA4 deduplicates purchases with the same transaction_id on web streams, and an empty transaction_id collapses all orders into one.
  • Conversions are now called key events in GA4; they become conversions again once imported into Google Ads.
  • Verify every event and parameter in DebugView before you rely on the data for bidding.
Contents

What does GA4 ecommerce tracking actually involve?

In short: sending each shopping step to GA4 under a standard event name, together with an items array that describes the products. Once that structure is in place, revenue, transactions and item-level performance show up in reports without extra configuration.

A working setup has five layers, and each one depends on the previous:

  1. Data layer Your store (Shopify, WooCommerce, BigCommerce or a custom build) writes product and order data to the dataLayer at every step.
  2. Tagging Google Tag Manager (GTM) reads that data and sends it to GA4 as events.
  3. Testing You check every event and parameter in DebugView.
  4. Key event You confirm purchase is marked as a key event.
  5. Import You link GA4 to Google Ads and create a Google Ads conversion from the key event.

Many older guides still tell you to click "Mark as conversion". The interface has changed; the menu names below match the English GA4 interface as of September 2026.

Which ecommerce events should I track in GA4?

Use Google's recommended event names exactly as documented. Google's ecommerce documentation is built around these exact names, and the built-in ecommerce reports read from them; custom event names leave those reports empty.

EventWhen it firesPriority
view_item_listA category page or search results list is shownMedium
select_itemA product is clicked in a listLow
view_itemA product detail page loadsHigh
add_to_cart / remove_from_cartA product is added to or removed from the cartHigh
view_cartThe cart page loadsMedium
begin_checkoutCheckout startsHigh
add_shipping_info / add_payment_infoShipping and payment steps are completedMedium
purchaseThe order is confirmedRequired
refundA full or partial refund is issuedMedium
view_promotion / select_promotionA banner or promo slot is shown / clickedLow

If developer time is tight, start with four events: view_item, add_to_cart, begin_checkout and purchase. That is enough to see where your funnel leaks. Our ad performance KPI guide covers which ratios to watch once the data is flowing.

What parameters does the GA4 purchase event need?

Four fields matter most: transaction_id, value, currency and items. Google's developer docs say that when you send value, you must set currency at the event level, and the items array can hold up to 200 elements.

4critical purchase fields: transaction_id, value, currency, items
200maximum elements in the items array
30key events allowed in a standard GA4 property (50 in Analytics 360)
  • transaction_id: Your order number. It must be unique per order and should never contain personal data such as an email address.
  • value: The sum of price × quantity for the items. Send shipping and tax in the separate shipping and tax fields so your revenue definition stays consistent.
  • currency: An ISO 4217 code such as USD, GBP or EUR. On multi-currency stores, send the currency the order was actually paid in instead of hard-coding one.
  • items: Each product needs at least item_id or item_name, ideally with price, quantity, item_brand, item_category and item_variant.

How do I set up GA4 ecommerce with GTM and the dataLayer?

Your site pushes an event name and an ecommerce object to the dataLayer at each step, and a GA4 Event tag in GTM forwards it to GA4. Google's official examples clear the previous ecommerce object before every push.

Example for the order confirmation page (values are illustrative):

dataLayer.push({ ecommerce: null }); // clear the previous ecommerce object
dataLayer.push({
  event: 'purchase',
  ecommerce: {
    transaction_id: 'ORD-100245',
    value: 118.00,
    tax: 9.44,
    shipping: 6.95,
    currency: 'USD',
    coupon: 'FALL10',
    items: [{
      item_id: 'SKU-3321',
      item_name: 'Cotton Oversized Tee',
      item_brand: 'Example Brand',
      item_category: 'Apparel',
      item_variant: 'Black / M',
      price: 59.00,
      quantity: 2
    }]
  }
});

In GTM:

  1. Under Triggers, create a Custom Event trigger with the event name purchase.
  2. Create a Google Analytics: GA4 Event tag, enter your measurement ID and set the event name to purchase.
  3. In the tag's more settings, check Send Ecommerce data and choose Data Layer as the data source.
  4. Repeat for view_item, add_to_cart and begin_checkout. With many events, you can use one tag with the {{Event}} variable as the event name and a trigger that matches all ecommerce event names.

How do duplicate transaction IDs inflate GA4 revenue?

GA4 deduplicates purchase events that arrive with the same transaction_id on a web stream, so a reloaded thank-you page won't count twice if the ID is correct. Problems start when the ID is empty, hard-coded or regenerated on every page load.

Three rules from Google's help center matter here:

  • Send a unique, dynamic ID for every order, and never reuse the same ID across different users.
  • Never send an empty string (transaction_id: ""). GA4 treats all purchases with an empty ID as duplicates of each other, so your orders undercount.
  • Deduplication works only for web streams, not app streams.

A worked example: a store takes 1,000 orders a month at an $85 average order value, and 8% of customers reload the confirmation page. If the ID is regenerated on each load, that creates 80 phantom purchases and GA4 reports $91,800 instead of $85,000. If the ID is empty, the opposite happens: all 1,000 orders collapse into one. Either way, your ROAS is wrong.

Rather than leaning on deduplication alone, fire purchase only on the first view of the confirmation page, for example by storing the order number in a cookie or sessionStorage and skipping the tag on reload. If GA4 and your store admin still disagree on order counts, we break down the usual causes in why Shopify, Meta and GA4 numbers don't match.

What is a key event in GA4, and how do I mark purchase as one?

A key event is an event you treat as important for your business; it is what GA4 used to call a conversion. The word "conversion" now belongs to Google Ads, where imported key events become conversion actions.

GA4 marks purchase as a key event by default, so in most properties you only need to confirm it:

  1. Go to Admin, and under Data display click Events.
  2. On the Recent events tab, find purchase. It shows up once the first purchase has been received.
  3. Check that the star next to it is filled. If someone unmarked it, click the star to mark it as a key event again.

Google notes it can take up to 24 hours for a newly marked key event to appear in standard reports. Resist marking every step as a key event: you already see add_to_cart and friends in the ecommerce reports, and a crowded key event list muddies both reporting and the Google Ads import. The same help page says that enabling ads personalization with a linked Google Ads account also marks some events, such as add_to_cart, begin_checkout and view_item, as key events, so review the list after linking. For where micro-steps fit in the bigger picture, see our article on customer journey mapping.

How do I test GA4 ecommerce events with DebugView?

Turn on debug mode, walk through a real purchase from product page to confirmation, and inspect each event and its parameters in Admin › Data display › DebugView. Sessions opened through GTM Preview or Tag Assistant count as debug sessions.

DebugView has three panes: the middle seconds stream shows the last 60 seconds of events, the left minutes stream covers the last 30 minutes, and the right column lists top events and current user properties. If several devices are in debug mode, pick yours from the device selector at the top.

  • Do view_item, add_to_cart and begin_checkout arrive in order?
  • Does purchase carry transaction_id, value and currency, and is value a plain number?
  • Do the items show the right ID, price and quantity?
  • Does reloading the thank-you page send a second purchase?
  • Do coupon and shipping arrive in their own fields?
  • Do tags behave as expected when a visitor declines cookies?

DebugView also won't show events blocked by consent settings. If your consent banner isn't wired up correctly, GA4 may receive little data or only modeled data; our Consent Mode v2 guide covers that side.

First link the accounts under Admin › Product links › Google Ads links, then go to Advertising › Conversion management in GA4, click New conversion and create a Google Ads conversion from your purchase key event.

To link the accounts

  • Administrator or Editor role on the GA4 property
  • Administrative access to the Google Ads account
  • Auto-tagging enabled (you can switch it on during linking)
  • Personalized advertising is on by default; change it if you need to
  • Google Ads data can take up to 48 hours to appear in GA4

To import key events as conversions

  • At least Marketer access to import into Google Ads
  • In GA4: New conversion, then choose the account and key event
  • If the Ads account already has goals from Analytics, imported actions arrive as secondary
  • Goal category and bidding use are managed in Google Ads

The classic mistake is double counting. If a purchase conversion measured by the Google Ads tag is already primary and you also make the GA4 purchase primary, Smart Bidding sees the same order twice. Decide which one stays primary and keep the other secondary.

GA4 also asks, in its attribution settings, which channels can receive credit for key events exported to Google Ads: Google paid channels only, or paid and organic channels. That choice, plus the different attribution logic in each tool, explains most gaps between Google Ads and the "google / cpc" row in GA4. If you want to see those gaps side by side with Meta and your store data, Marpany's conversion analysis view lines the sources up in one table.

What are the most common GA4 ecommerce tracking mistakes?

Most bugs come from the values written to the data layer, not from the tags themselves. Use this table to go from symptom to cause quickly.

SymptomLikely causeFix
Revenue is zero or far too lowvalue sent as text or with separators; currency missingSend value as a number and currency at the event level
Orders are double the store's countBoth the platform integration and GTM send purchaseKeep a single source
Orders are far below the store's counttransaction_id empty or staticWrite the real order number dynamically
Item reports are emptyNo items array, or item_id / item_name missingInclude at least one of them for each product
add_to_cart shows the wrong productPrevious ecommerce object never clearedPush ecommerce: null before each event
Data drops off at checkoutCheckout runs on another domain or in an iframeCheck cross-domain measurement and the redirect to your thank-you page

Don't forget refunds. Send a refund event with the original transaction_id and include the refunded products in the items array; Google recommends item data in refund events so item-level refund metrics show up. For a partial refund, list only the items that came back. Skipping this in high-return categories overstates the net revenue your ads bring in and pushes budget decisions the wrong way.

What should I check in the first week after setup?

Compare GA4 against your store admin and close the gap to an acceptable range; the setup isn't finished until that check passes.

  1. Day 1 Place a test order in DebugView, then refund it to test the refund event.
  2. Days 2–3 Confirm the Ecommerce purchases and Monetization overview reports are filling up.
  3. Days 4–5 Compare GA4 transactions with your store's order count; if they diverge a lot, revisit transaction_id and consent settings.
  4. Days 6–7 In Google Ads, check the imported conversion's status and its primary or secondary setting.

With these checks done, your measurement rests on solid ground and Google Ads' automated bidding finally learns from the right signal.

Frequently asked questions

Where did conversions go in GA4?

GA4 renamed conversions to key events, and events you had marked as conversions became key events automatically. The term conversion is now used in Google Ads. You mark key events under Admin > Data display > Events.

Why is my GA4 purchase event counted twice?

Usually the same order is sent both by your platform's built-in integration and by a GTM tag, or the thank-you page generates a new transaction_id on every reload. Keep a single source and use the real order number as transaction_id. GA4 deduplicates purchases with the same ID on web streams.

Why does GA4 show zero revenue for purchases?

The value field is usually sent as text or with a currency symbol or thousands separator, or the currency field is missing. Value must be a plain number with a dot as the decimal separator, and currency must be set at the event level. Open the purchase event in DebugView to check its parameters.

Do I need Google Tag Manager for GA4 ecommerce tracking?

No. You can send events directly with gtag.js or through your store platform's Google integration. GTM is popular because you can add and test tags without a code deploy each time. What matters is sending recommended event names from a single source.

What permissions do I need to link GA4 and Google Ads?

You need the Administrator or Editor role on the GA4 property and administrative access to the Google Ads account. To import key events into Google Ads as conversions, you need at least Marketer access.

Why don't GA4 and Google Ads conversion numbers match?

The two tools use different attribution rules, and GA4 only gives credit to the channels you allow in its attribution settings. If the same purchase is also measured by the Google Ads tag, counts can overlap. Deciding which source is the primary conversion makes the gap much easier to explain.

Sources

  1. Google for Developers: Measure ecommerce (GTM) developers.google.com
  2. Analytics Help: Minimize duplicate key events with transaction IDs support.google.com
  3. Analytics Help: Mark events as key events support.google.com
  4. Analytics Help: Monitor events in DebugView support.google.com
  5. Analytics Help: Create Google Ads conversions based on key events support.google.com
  6. Analytics Help: Link Google Ads and Analytics support.google.com
Measurement

Shopify vs Meta vs GA4: Why Your Sales Numbers Don't Match

Shopify, Meta and GA4 count the same sales under different rules. Shopify records every order that happens; Meta Ads Manager only claims purchases that fall inside its attribution window; GA4 usually sees fewer because of cookie consent and ad blockers, and it never lets two channels claim the same sale. Use Shopify for revenue and profit, each ad platform for in-platform optimization, and GA4 for comparing channels.

10 min read
Measurement

Google Consent Mode v2: GDPR, UK Rules and Lost Conversions

Google Consent Mode v2 is a tagging API that passes a visitor's cookie choice to Google Ads, GA4 and other Google tags using four signals: ad_storage, analytics_storage, ad_user_data and ad_personalization. Google requires these signals for traffic from the EEA to keep using measurement and ad personalization. Consent Mode does not make you GDPR-compliant by itself; your banner and consent records still have to meet the law.

10 min read
Measurement

TikTok Events API Setup: Pixel + Server Tracking Step by Step

The TikTok Events API is a server-to-server connection that sends conversion events such as Purchase and AddToCart from your server or store platform instead of the visitor's browser. TikTok recommends keeping the Pixel and adding the Events API as a second channel. Done right, both send the same event name and event_id, customer data is SHA-256 hashed, and you verify the result in Events Manager's Test Events tab.

10 min read

See all your numbers in one place

Google, Meta and TikTok data side by side, with fresh recommendations every week.