On this page
What this issue is
GA4 ecommerce events such as view_item, add_to_cart, begin_checkout and purchase carry an items array. Each entry in that array describes one product. Google's documentation says each item must include either `item_id` or `item_name`. Sending both is best practice.
This issue means one or more items arrive with neither field. It usually happens when a data layer variable points at the wrong key, when a theme or plugin leaves a field blank, or when a custom script builds the item by hand and forgets one.
// Broken: no item_id and no item_name
{ price: 49.00, quantity: 1 }
// Valid
{ item_id: "SKU-1042", item_name: "Trail Running Shoes", price: 49.00, quantity: 1 }Why it costs you leads or sales
The sale itself still happens, so this is easy to miss. But the data you use to decide what to sell and advertise becomes unreliable.
- Item-level reports (Items viewed, Items added to cart, Items purchased) show (not set) or leave products out.
- You cannot tell which products drive revenue, so budget and stock decisions rest on guesses.
- Product-based audiences and remarketing lists built on item data are incomplete.
- Funnel analysis by product, such as view to cart to purchase, is broken.
- Merchandising and ad feed decisions rely on numbers that do not add up to your store totals.
Example: share of purchase revenue that appears against a named product in GA4 item reports before and after the fix. Numbers are illustrative.
How to check if your site has it
Open GA4 DebugView
In GA4 go to Admin > DebugView. Turn on debug mode with Google Tag Assistant or the GA debug extension, then walk through a product page, add to cart and checkout.
Inspect the items parameter
Click each ecommerce event in DebugView and expand
items. Every item should showitem_idoritem_name.Check the data layer
In your browser console type
dataLayer.filter(e => e.ecommerce)and look at eachitemsarray for blank or missing keys.Look at the reports
In GA4 open Reports > Monetization > Ecommerce purchases. A large (not set) row under Item name or Item ID points to the problem.
Test every item type
Try variants, bundles, gift cards and discounted products. These often use a different template that omits the fields.
dataLayer
.filter(e => e.ecommerce && e.ecommerce.items)
.forEach(e => e.ecommerce.items.forEach((i, n) => {
if (!i.item_id && !i.item_name) {
console.warn('Bad item', e.event, n, i);
}
}));How to fix it
The fix is the same everywhere: make sure each item gets a stable product ID (SKU or product ID) and a readable product name. The place you do it depends on your platform.
Check your GA4 plugin settings
If you use WooCommerce with a GA4 plugin, open its ecommerce settings and check the product identifier option (ID or SKU). Update the plugin, as older versions can send incomplete items.
Check products have SKUs
If the plugin is set to use SKU, products with an empty SKU field can send a blank item_id. Fill in the SKU or switch the identifier to product ID.
Review custom code
If your theme or a snippet builds the data layer, make sure it outputs both
item_idanditem_namefor each product.
Check how GA4 is connected
Use the Google & YouTube sales channel or a tracking app, and check its settings. Custom pixels in Settings > Customer events must map the item fields themselves.
Map product fields in a custom pixel
In the event payload use the variant or product ID and the product title, for example
item_id: item.variant.sku || item.variant.idanditem_name: item.variant.product.title.Fill in missing SKUs
In Products, add SKUs to variants if your mapping relies on them.
Open your GA4 event tag
In the tag, check that Send Ecommerce data is on and the source is Data Layer, or that your Items field points to a variable holding the items array.
Fix custom item mapping
If you build items with a custom JavaScript variable, make sure it returns objects with
item_idanditem_name.Use Preview mode
In Tag Assistant Preview, click the ecommerce event, open the Data Layer tab and confirm both keys have values. Then publish.
Find where items are built
Webflow Ecommerce has no built-in GA4 items output beyond its Google Analytics setting. If you added custom code, find the script that pushes the ecommerce events.
Bind CMS fields
Add the product SKU and name as custom attributes on the product template and read them in your script.
Publish and retest
Publish the site, then check the events in DebugView.
Review your funnel or store tracking
If you push ecommerce events from custom code in a funnel or store page, check the items you send.
Add both keys
Use the product ID and product name from the page or order data for every item.
Retest in DebugView
Run a test order and confirm the items appear with names.
Check the Google Analytics connection
In Marketing & SEO > Marketing Integrations, confirm GA4 is connected through Wix's own integration.
Check product names and SKUs
Make sure each product has a name and, if you rely on it, an SKU in the product's details.
Custom events
If you add events with custom code, include both
item_idanditem_name.
Check the GA4 connection
In Settings > Developer Tools or Marketing, check how GA4 is connected. Squarespace's built-in connection sends its own ecommerce data.
Fill in SKUs
Give each product and variant an SKU so IDs are not blank.
Custom code
If you push events with Code Injection, add both item fields from the product data.
Build items from one function
Create a single helper that turns a product into a GA4 item, so every event uses the same fields.
Fall back safely
Use the ID as the name if the name is empty, and skip logging items that have neither.
Clear and push
Push
{ ecommerce: null }before each ecommerce push, then push the new event.
function toGa4Item(p, qty) {
return {
item_id: String(p.sku || p.id),
item_name: p.name || p.title || String(p.sku || p.id),
price: Number(p.price),
quantity: qty || 1
};
}
window.dataLayer = window.dataLayer || [];
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: 'add_to_cart',
ecommerce: {
currency: 'USD',
value: 49.00,
items: [toGa4Item(product, 1)]
}
});Before
- items contain only price and quantity
- Item reports show (not set)
- Top products cannot be identified
After
- Every item has item_id and item_name
- Item reports list real products
- Product revenue matches your store
How to confirm it's fixed
Run a fresh test journey
Visit a product, add it to the cart, start checkout and, where possible, use your store's test mode to complete an order.
Check DebugView
Expand
itemsin each ecommerce event and confirmitem_idanditem_nameare filled in.Test variants and bundles
Repeat with a variable product, a bundle and a discounted product.
Wait for reports
Standard reports can take 24 to 48 hours to update. New purchases should show named items, though older data stays as it was.
How to prevent it happening again
- Build items in one shared function or template, not in several places.
- Make SKU and product name required fields in your catalogue process.
- Retest ecommerce events after theme, plugin or checkout changes.
- Review GTM changes in Preview mode before you publish.
- Check the (not set) row in item reports each month.
- Run a scheduled test of the purchase journey so a regression is caught fast.
How FunnelGuard handles this
FunnelGuard detects this issue today. A robot visitor runs your real shopping journey on a schedule, from the EU or the US, and reads the GA4 hits your site sends. It applies parameter rules to the ecommerce events, including a check that each item has an item_id or item_name.
If an item is missing both, FunnelGuard re-checks from a second region, then sends one alert by email, Slack, Teams, WhatsApp, webhook or PagerDuty, with a screenshot and a likely cause. Test traffic is marked with utm_source=funnelguard, fg_test=1, an fg_test cookie and its own user agent, and it stops before payment unless your store's test mode is set up.
The Free plan covers 1 site and 2 journeys with daily checks and no card. Paid plans start at $39/month and include a 3-day free trial. A free read-only website audit is also available.
Questions people ask
Why does GA4 show (not set) for item name or item ID?
GA4 shows (not set) when events arrive without that item field. This happens when the items array has no item_id or item_name, or the data layer variable that feeds it is empty. Check the event in DebugView and fix the mapping.
Is item_id or item_name required in GA4?
Yes, but only one of them. Google's GA4 ecommerce documentation says each item must include either item_id or item_name. Sending both is recommended so reports and audiences work well.
What happens if an item has neither item_id nor item_name?
GA4 cannot use that item, so it can be left out of item-based reports or appear as (not set). The purchase event and its total value may still be recorded, which is why the problem is easy to miss.
How do I check my GA4 items array?
Open Admin > DebugView, turn on debug mode and trigger an ecommerce event. Click the event and expand items to see each item's fields. You can also inspect dataLayer in the browser console.
Should item_id be the SKU or the product ID?
Either works, as long as you use the same one in every event and in your ad feed. Mixing them splits one product into two rows in reports.
Will fixing item_id change my past GA4 data?
No. GA4 does not rewrite past events, so older purchases keep their (not set) values. New events will show the correct items once the fix is live.
Can FunnelGuard tell me when items lose their item_id?
Yes. FunnelGuard runs your shopping journey on a schedule and applies parameter rules to the GA4 ecommerce events it sees, including whether items have an item_id or item_name. If they do not, you get an alert with a screenshot and a likely cause.
Related issues
- TRK-083items array missing from ecommerce eventsFix guide
- TRK-085item price sent as string or with currency symbolFix guide
- TRK-086quantity missing or 0Fix guide
- TRK-091ecommerce object not cleared in dataLayer (items leak into next event)Fix guide
- TRK-092Old UA enhanced ecommerce schema pushed instead of GA4 schemaFix guide
- TRK-095Currency on items differs from event currencyFix guide