Skip to content
FunnelGuard

Fix guide by FunnelsGuard

Old UA ecommerce schema in GA4: how to find and fix it

TRK-092Medium impactPartlyBy FunnelGuardPublished Updated
On this page

What this issue is

The dataLayer is a list of messages your site sends to tools like Google Tag Manager (GTM). For ecommerce, the message says what the shopper did and what is in the cart.

Universal Analytics used one shape for this message. GA4 uses a different one. If your theme, plugin or custom code was built for UA and never updated, it still sends the UA shape. GA4 does not convert it for you.

Main differences between the UA and GA4 ecommerce schemas
ItemOld UA schemaGA4 schema
Event nameOften none, or generic names like transactionpurchase, add_to_cart, view_item, begin_checkout
Order detailsecommerce.purchase.actionField (id, revenue, tax, shipping)Top level of ecommerce: transaction_id, value, tax, shipping, currency
Productsproducts with id, name, price, quantityitems with item_id, item_name, price, quantity
Cart actionsecommerce.add.products, ecommerce.detail.productsadd_to_cart and view_item events with ecommerce.items
CurrencycurrencyCodecurrency
Old UA enhanced ecommerce push (GA4 cannot use this)javascript
dataLayer.push({
  'ecommerce': {
    'currencyCode': 'USD',
    'purchase': {
      'actionField': { 'id': 'T12345', 'revenue': '59.98', 'tax': '4.00', 'shipping': '5.00' },
      'products': [
        { 'id': 'SKU123', 'name': 'Blue Shirt', 'price': '29.99', 'quantity': 2 }
      ]
    }
  }
});
GA4 purchase pushjavascript
dataLayer.push({ ecommerce: null }); // clear the previous ecommerce object
dataLayer.push({
  event: 'purchase',
  ecommerce: {
    transaction_id: 'T12345',
    value: 59.98,
    tax: 4.00,
    shipping: 5.00,
    currency: 'USD',
    items: [
      { item_id: 'SKU123', item_name: 'Blue Shirt', price: 29.99, quantity: 2 }
    ]
  }
});

Why it costs you leads or sales

Sales still happen, but your reports do not show them properly. GA4 shows no revenue, or revenue without products. Google Ads and other ad platforms that learn from GA4 purchases get weak or no conversion data.

That leads to wrong decisions. You may pause campaigns that work, because they look like they bring no sales. Automated bidding has less to learn from. Product and funnel reports cannot show where shoppers drop off.

Where the data is lost
  1. Shopper paysOrder completes normally
  2. Site pushes UA objectactionField and products
  3. GA4 tag reads dataLayerNo GA4 fields found
  4. Revenue in GA4 and adsEmpty or incomplete

The shopper buys, but GA4 never receives a usable purchase.

Purchases recorded in GA4 vs orders in the storeExample numbers
Purchases recorded in GA4 vs orders in the store (example)Store orders: 100 orders; GA4 purchases (old schema): 8 orders; GA4 purchases (GA4 schema): 97 orders03877100897Store ordersGA4 purchases (old sc…GA4 purchases (GA4 sc…orders

Example: 100 real orders in a week. With the old schema GA4 may record few or none.

How to check if your site has it

Check the dataLayer by hand
  1. Open the site in Chrome

    Add a product to the cart and go through checkout. Use a test order or a store test mode if you have one.

  2. Inspect the dataLayer

    Open DevTools (F12), go to Console and type dataLayer. Expand the entries and look for ecommerce.

  3. Look for old keys

    If you see actionField, products, currencyCode, detail, impressions or checkout.actionField, the old schema is in use.

  4. Look for GA4 events

    You should see entries with event: 'purchase', 'add_to_cart' and so on, with an items array.

  5. Check GTM PreviewGoogle Tag Manager

    In Tag Manager, click Preview. Open the purchase message in the left list and check the Data Layer tab. Then see if your GA4 event tag fired.

  6. Check GA4 DebugView

    In GA4 go to Admin > DebugView. Confirm the purchase event shows items, value and transaction_id.

How to fix it

The right fix depends on how the old data is produced. Find the source first: a theme, a plugin, an old GTM container or hard-coded script.

Switch to the GA4 schema
  1. Find the source

    Check which plugin adds ecommerce tracking (for example a WooCommerce analytics or GTM plugin). Look at its version and settings for a GA4 option.

  2. Update or replace

    Update the plugin to a version that supports GA4 events, or switch to one that does. Turn off the old UA ecommerce option so it stops pushing the old object.

  3. Remove leftover snippets

    Search the theme (header.php, footer.php, functions.php) and any code-snippet plugin for actionField and products.

How to confirm it's fixed

Confirmation checklist
  • The dataLayer shows event: 'purchase' with transaction_id, value, currency and items.
  • No actionField, products or currencyCode keys appear in new pushes.
  • GTM Preview shows your GA4 event tag firing on that event.
  • GA4 DebugView shows the purchase with items and the right value.
  • After 24-48 hours, Reports > Monetization > Ecommerce purchases lists products and revenue.
  • The order total in your store matches the value in GA4 for the test order.

How to prevent it happening again

Prevention checklist
  • Keep one documented source for ecommerce pushes, and avoid running two plugins for the same job.
  • Test the full purchase path after every theme, plugin or checkout change.
  • Review GTM container changes before publishing, and keep version notes.
  • Remove old Universal Analytics tags and variables instead of only pausing them.
  • Add a recurring test purchase to your release checklist.

How FunnelGuard handles this

FunnelGuard detects this issue only partly. It checks for a dataLayer event mismatch: when a robot visitor runs your journey, it compares the events your site pushes with the events expected for that step, and flags a mismatch, for example when no GA4-style event appears where one should.

It does not inspect every field inside the ecommerce object. It does not confirm that each key is correctly named, that prices are numbers, or that the values match your real order totals. It also stops before payment unless your store's test mode is set up, so a real purchase push may not be reached.

To cover the rest by hand, run the checks in the section above after each release: inspect dataLayer in the console, use GTM Preview and GA4 DebugView, and compare a test order's total with GA4. FunnelGuard's alert, sent after a second-region re-check, includes a screenshot and likely cause to point you in the right direction. The Free plan covers 1 site and 2 journeys with daily checks and no card, and every paid plan has a 3-day free trial.

Before and after the fix

Old UA schema

  • `ecommerce.purchase.actionField` and `products`
  • GA4 shows no revenue or products
  • Ad platforms get weak conversion data

GA4 schema

  • `purchase` event with `transaction_id`, `value`, `currency`, `items`
  • Revenue and product reports populate
  • Conversions flow to linked ad platforms
Why the GA4 tag stays silent

The tag waits for GA4 fields that the old push never contains.

Questions people ask

Why is my GA4 not showing ecommerce revenue?

A common cause is that your site still pushes the old Universal Analytics ecommerce format. GA4 needs a purchase event with transaction_id, value, currency and an items array. Check the dataLayer in the browser console for old keys like actionField and products.

Does GA4 support Universal Analytics enhanced ecommerce data?

No. GA4 uses a different event-based schema and does not read the old UA ecommerce objects automatically. You need to change the dataLayer pushes or the tags to use GA4 event names and parameters.

What is the GA4 equivalent of ecommerce.purchase.actionField?

The fields move to the top level of the ecommerce object. id becomes transaction_id, revenue becomes value, and tax and shipping keep their names. Add currency as well.

How do I convert products to items for GA4?

Rename the products array to items. Inside each product, rename id to item_id and name to item_name. Keep price and quantity, and send price as a number.

How can I tell which ecommerce schema my site is sending?

Open DevTools, type dataLayer in the Console and expand the ecommerce entries. Keys like actionField, products and currencyCode mean the old schema. An event name with items means GA4. GTM Preview and GA4 DebugView show the same thing.

Can I fix this in Google Tag Manager without changing site code?

Sometimes. You can use a custom JavaScript variable or a tag to reshape old data, but it is fragile. The cleaner fix is to change the source that pushes to the dataLayer, such as a plugin or theme script, so it sends the GA4 format.

Will FunnelGuard catch the old ecommerce schema?

Only partly. It checks for a dataLayer event mismatch during a journey run. It does not validate every field in the ecommerce object, so also check values and item keys by hand in DebugView.

Does FunnelGuard catch this?

Partly

FunnelGuard checks part of this.

How: dataLayer_event mismatch.

Stop finding out from your customers

FunnelGuard runs your real forms and checkouts on a schedule, checks the tracking and the leads behind them, and alerts you once, with a screenshot. Try any paid plan free for 3 days.