Sub topic 18
Item-scoped custom dimensions
GA4 gives you a fixed set of item parameters, such as item_brand, item_category, and item_variant. Your business may need more, such as a product's material, its margin tier, or the season it launched. An item-scoped custom dimension lets you report on your own item-level attributes alongside item revenue and items purchased.
This chapter assumes you can already build an items array and send view_item, add_to_cart, and purchase events. It also assumes you have Editor access to a GA4 property, so you can create custom definitions.
What "item scope" means
GA4 custom dimensions have three scopes. The scope decides what the value describes.
| Scope | Describes | Typical example | Standard property limit |
|---|---|---|---|
| Event | One event | `checkout_step_name` | 50 |
| User | A user across events | `loyalty_tier` | 25 |
| Item | One product inside an event's `items` array | `material` | 10 |
Event-scoped parameters sit next to currency and value. Item-scoped parameters sit inside each object of the items array. Because they are inside the array, one event can carry different values for different products. A cart with a mesh shoe and a leather boot can report both materials in the same purchase event.
GA4 360 properties have higher limits (125 event, 100 user, 25 item). Check the current limits in the Analytics Help documentation before you plan, because Google changes them.
Step 1: send the custom parameter in the items array
A custom item parameter is any key in an item object that is not a predefined item parameter. This example adds two: material and launch_season.
gtag('event', 'add_to_cart', {
currency: 'USD',
value: 49.98,
items: [
{
item_id: 'SKU_1001',
item_name: 'Trail Running Shoe',
item_brand: 'Acme',
item_category: 'Shoes',
item_variant: 'blue',
price: 24.99,
quantity: 2,
material: 'mesh',
launch_season: 'spring_2026'
}
]
});Through Google Tag Manager, the same keys go inside each object of ecommerce.items in the dataLayer push:
window.dataLayer = window.dataLayer || [];
dataLayer.push({ ecommerce: null });
dataLayer.push({
event: 'add_to_cart',
ecommerce: {
currency: 'USD',
value: 49.98,
items: [
{
item_id: 'SKU_1001',
item_name: 'Trail Running Shoe',
price: 24.99,
quantity: 2,
material: 'mesh',
launch_season: 'spring_2026'
}
]
}
});The GA4 event tag reads the whole ecommerce object, so you do not need to change the tag. Only the dataLayer push changes.
Parameter naming rules:
- Use lowercase letters, digits, and underscores, and start with a letter.
- Keep the name within 40 characters.
- Keep each value short. GA4 truncates long values, and long free text is a poor fit for a dimension anyway.
- Do not reuse a predefined item parameter name for a different meaning.
Step 2: register the dimension
Sending the parameter is not enough. GA4 collects the raw data, but reports cannot use it until you register it.
- Open Admin and choose Custom definitions under Data display.
- Choose Create custom dimension.
- Enter a Dimension name, the label shown in reports, such as
Item material. - Set Scope to Item.
- Pick the parameter from the list, or type its exact name, such as
material. - Save.
The parameter name must match exactly, including case. Material and material are different parameters.
Step 3: use it in reports
Item-scoped dimensions pair with item-scoped metrics:
- Items viewed
- Items added to cart
- Items purchased
- Item revenue
In an exploration, a free-form table with Item material as a row and Items purchased and Item revenue as values shows which materials sell and earn the most. In the standard Monetization reports you can add the dimension through report customization, but explorations give you more control.
Compatibility is the usual surprise. If you pair an item-scoped dimension with an event-scoped or session-scoped metric, such as Sessions, the numbers can come out wrong or the combination can be marked incompatible. Stay with item metrics when you break down by an item-scoped dimension.
Consistency decides report quality
GA4 shows the dimension only for events that carried the parameter. If you send material on purchase but not on view_item, then Items viewed by Item material shows (not set). A funnel by material then looks as if nothing was viewed.
Send each custom item parameter on every item-bearing event: view_item_list, select_item, view_item, add_to_cart, remove_from_cart, view_cart, begin_checkout, and purchase. A product-data helper that builds the item object once and reuses it on every page prevents this mistake.
Other points to check:
- Don't duplicate built-ins. Brand, variant, and up to five category levels already exist (
item_brand,item_variant,item_categorytoitem_category5). Use them first. They do not consume your limited item-scope slots. - Watch cardinality. Values like a SKU, a timestamp, or a free-text description produce thousands of rows and are better handled with
item_id. Dimensions with a bounded set of values work best, such as 'mesh', 'leather', 'canvas'. - Keep spelling uniform.
Meshandmeshappear as two rows. Normalize values at the source. - Plan your ten slots. Item-scoped slots are scarce on a standard property. Reserve them for attributes you will actually segment by. You can archive a dimension you no longer need, but check the Help documentation to confirm how that affects your quota.
- Server-side events work too. A Measurement Protocol
purchaseorrefundcan carry the same custom keys in itsitemsobjects. Keep them identical to the web events, or the dimension will be split between sources.
Using the data beyond the interface
If you export GA4 to BigQuery, the custom item parameters travel with the event in the items records. You can query them without registering anything, and registration only affects the GA4 interface. The next chapter covers how to query the items array.
Exercise
Your site sends a custom parameter material inside the items array of purchase events only. After you register it as an item-scoped custom dimension, the Items viewed report broken down by Item material shows only (not set). Explain why and describe the fix.
Show answer
The parameter was never sent on view_item (or other view/list events), so GA4 has no material value for viewed items and reports (not set). Fix it by adding material to the items objects of every item-bearing event: view_item_list, select_item, view_item, add_to_cart, begin_checkout, and purchase. Because the data is not retroactive, only events collected after the fix show the values.
Exercise
You want to analyze sales by product color, and you already send item_variant: 'blue'. Should you create a new item-scoped custom dimension for color? What should you check first?
Show answer
Check whether item_variant already holds the attribute you need. If it does, use that built-in item parameter in reports and do not spend one of the ten item-scoped slots. Create a custom dimension only if you need color as a separate attribute, for example because item_variant mixes color and size, and then send it under a new parameter name such as color.