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.
| Item | Old UA schema | GA4 schema |
|---|---|---|
| Event name | Often none, or generic names like transaction | purchase, add_to_cart, view_item, begin_checkout |
| Order details | ecommerce.purchase.actionField (id, revenue, tax, shipping) | Top level of ecommerce: transaction_id, value, tax, shipping, currency |
| Products | products with id, name, price, quantity | items with item_id, item_name, price, quantity |
| Cart actions | ecommerce.add.products, ecommerce.detail.products | add_to_cart and view_item events with ecommerce.items |
| Currency | currencyCode | currency |
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 }
]
}
}
});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.
- Shopper paysOrder completes normally
- Site pushes UA objectactionField and products
- GA4 tag reads dataLayerNo GA4 fields found
- Revenue in GA4 and adsEmpty or incomplete
The shopper buys, but GA4 never receives a usable purchase.
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
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.
Inspect the dataLayer
Open DevTools (F12), go to Console and type
dataLayer. Expand the entries and look forecommerce.Look for old keys
If you see
actionField,products,currencyCode,detail,impressionsorcheckout.actionField, the old schema is in use.Look for GA4 events
You should see entries with
event: 'purchase','add_to_cart'and so on, with anitemsarray.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.
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.
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.
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.
Remove leftover snippets
Search the theme (header.php, footer.php, functions.php) and any code-snippet plugin for
actionFieldandproducts.
Use the built-in integration
In Shopify admin go to Settings > Apps and sales channels, then the Google & YouTube app, and connect your GA4 property. It sends GA4 ecommerce events for you.
Remove old custom code
Search theme code and Settings > Customer events for old UA ecommerce scripts, and remove or rewrite them.
Check the order status page
If you use additional scripts there, make sure they push GA4 purchase events, not UA objects.
Edit the data source
The best fix is in the site code that pushes to the dataLayer. Change it to the GA4 format shown above.
Fix the tags
Use a GA4 Event tag with a trigger on the custom event (for example
purchase). Under Ecommerce, tick Send Ecommerce data and choose Data Layer.Retire UA tags
Pause or delete old Universal Analytics tags and variables that read
ecommerce.purchase.actionField.
Find the custom code
Open Project settings > Custom code, and check page-level custom code on the order confirmation page.
Rewrite the push
Replace UA objects with a GA4
purchasepush using real order values from your checkout (Webflow Ecommerce or your payment tool).
Use the native connection
In the Wix dashboard open Marketing & SEO > Marketing Integrations and connect Google Analytics 4. Remove old UA connections.
Check Custom Code
In Settings > Custom Code, remove any old ecommerce scripts.
Check built-in tracking
Squarespace's built-in Google Analytics connection may not send every GA4 ecommerce event. Check what reaches DebugView.
Review Code Injection
Under Settings > Developer Tools > Code Injection, and the Order Confirmation page injection, replace old UA code with GA4 pushes.
Map the fields
Map
actionField.idtotransaction_id,revenuetovalue,currencyCodetocurrencyandproductstoitems(idtoitem_id,nametoitem_name).Use numbers
Send
priceandvalueas numbers, not strings like "29.99 USD".Clear before each push
Run
dataLayer.push({ ecommerce: null });before every ecommerce push so items do not carry over.
How to confirm it's fixed
- The dataLayer shows
event: 'purchase'withtransaction_id,value,currencyanditems. - No
actionField,productsorcurrencyCodekeys 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
- 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.
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
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.
Related issues
- TRK-077purchase event missing on order confirmationFix guide
- TRK-083items array missing from ecommerce eventsFix guide
- TRK-084items missing item_id or item_nameFix guide
- TRK-085item price sent as string or with currency symbolFix guide
- TRK-091ecommerce object not cleared in dataLayer (items leak into next event)Fix guide
- TRK-082purchase value differs from order totalFix guide