Guide 33 · Ecommerce · GA4 + Tag Manager
Send the view_item_list event: the list view that proves which products were shown
Before anyone clicks a product, the list page shows it. The view_item_list event records which products were displayed, in which list, so list performance is measured instead of guessed.
After step 3, DebugView shows a view_item_list event with item_list_id related_products and both items in the array, fired once per list view. After about 24 hours, the list shows up in the Ecommerce purchases report under Item list name.
Download the reference: the view-item-list-event reference (JSON) (1344 bytes, MD5 11d59d607a066a5d0ed3678c6b727eb1). It holds the event parameters, the worked example, and the recomputed figures.
What you need
- The Google tag on the site. The event is sent through the Google tag; the install guide covers it.
- Access to the website source code, or a Tag Manager container. The event fires when a list of products is displayed, so it needs the list template or a data layer push there.
- A name and an ID for the list. The worked list is Google's own: ID
related_products, name Related Products, holding two tees.
The trace
- Fire the event when the list is displayed. The view_item_list event measures a list being shown, so it belongs on the page where the list renders: a category page, a search results page, or a related-products block. Send
gtag("event", "view_item_list", { currency: "USD", item_list_id: "related_products", item_list_name: "Related Products", items: [...] })with the displayed items in the array. - Put every displayed item in the array, in order. The worked list holds two items: the Stan and Friends Tee at index 0 (10.01 × 3 = 30.03) and the grey tee at index 1 (21.01 × 2 = 42.02). The index records the position on the page, which is what makes the list measurable: items at the top are seen more than items at the bottom. The two items together are worth 30.03 + 42.02 = 72.05.
- Name the list the same way everywhere. The list ID and list name are what group the data in reports. The related-products block on every product page must use the same
related_productsID and the same Related Products name, or the report splits one list into several. - Check it in DebugView. Turn on debug mode, load the list page, and open DebugView (Admin, then Data display, then DebugView). Select the view_item_list event and check the item_list_id reads
related_productsand the items array holds both tees with their indexes. One list view must produce one event. - Confirm the reports after about 24 hours. The Ecommerce purchases report can be broken down by item list name, which is how you compare one list against another. A list that is never sent never appears there, however many people saw it.
Dead ends
DEAD END — THE LIST WITH NO ITEMS. A view_item_list with an empty or missing items array records that a list was shown and nothing about what was in it. The report then has no rows to break down. The array is the point of the event.
DEAD END — A DIFFERENT LIST ID ON EVERY PAGE. A related-products block that generates its list ID from the page URL produces a new list name per product page, and the report shows hundreds of one-item lists instead of one list. Fix the ID in the template; do not derive it from the page.
DEAD END — INDEX MISSING OR OUT OF ORDER. Without index, Analytics cannot tell whether the clicked product sat at the top or the bottom of the list. Positions drive the analysis of what placement sells, so send index 0 for the first item, 1 for the second, and so on.
End state
Every list view sends one view_item_list event with the list ID and name and every displayed item, in order, with its index. The worked list is related_products with two items: the tee at index 0 worth 30.03 and the grey tee at index 1 worth 42.02, 72.05 together. DebugView shows the event the same minute, and after about 24 hours the Ecommerce purchases report breaks the items down by list name.
Sources
- Google Analytics developer docs — Measure ecommerce — the view_item_list event, its item_list_id and item_list_name, and the items array with index
- Google Analytics developer docs — Recommended events — the view_item_list parameters
Checked 11 November 2026. The event definition above is the one in Google's ecommerce developer guide and the recommended events reference, both opened 11 November 2026. No step was run inside a live Analytics property, because that needs a Google sign-in and this site does not sign in as anyone. The figures were recomputed in Python: 10.01 × 3 = 30.03, 21.01 × 2 = 42.02, and 30.03 + 42.02 = 72.05. The reference file was checked the same way.