GA4 - view_item_list

Bronze Contributor
Bronze Contributor

Hello All,

I am new to Tealium and would appreciate some advice. I am trying to set up GA4s alternative to impresions, view_iitem_list. I am sending the event on a view of Category page. However, the data layer currently doesn't have lists of products on that page so I am looking to create a DOM ready extension to populate the product prices, names and SKUs to send them as items with view of Category page. I have got the mapping and the DOM ready scoped extension in place but the items are not populating. I am afraid I have not got my head around the order of operations in Tealium yet. Any advice will be greately appreciated.

Kind regards.

3 REPLIES 3

GA4 - view_item_list

Tealium Employee

Hi LuLong,

For the Dom elements you are trying to scrape off the page, it is important to ensure they are available when Utag.js loads. 

Assign the scraped values to a variable in the b object.

The tag mappings reference the b object and assign the values to the u.data object for the tag.

Last you will need to make sure you are mapping the variables to the correct destination.

I hope this helps.

GA4 - view_item_list

Bronze Contributor
Bronze Contributor

Hello, thank you for your answer. I now have a Before Load Rules scoped extension which is kicking in before the Ecommerce extension. The properties are getting picked up nicely but I am passing in the array of names and ids (12 items in each) and in GA4 debugger, I can see that only the first item is passed as item. I know Tealium specifies that the items object is send with ecommerce events only. Am I only seeing the first item because view_item_list is not a prespecified ecommerce event? And would you know how could I resolve this?

Kind regards,

Lu

GA4 - view_item_list

Tealium Employee
Hello @LuLong

Sorry to hear you are still having some trouble here.
I've checked the template for GA4, and it looks like the event "view_item_list" should generate and send an item for each element in your arrays (12)

Without seeing your specific setup I can't say anything for certain, but a few things you should check

1) You are firing at "view_item_list" event with your mapping, and not a "view_item" - "view_item" is specifically told to only send the first item in your array. Based of your description, it sounds like this is the most likely issue here

2) Ensure mappings are correct for the items.
You want to be mapping to both "product_id" and "product_name" within the mapping toolbox.
You mention the ecommerce extension - If you are using this, the template would use the values created as "_cprod" and "_cprodname" - worth making sure these are populated correctly

3) Failing this, you can try a bit of debugging - Loading the "utag.x.js" file in your browser developer tools - where X is the UID of the tag (e.g. utag.123.js) will allow you to place breakpoints on the code - You can find a function called "getItems" which is the part generating the list of items to be sent, with some breakpoints here you might be able to get an idea of whats going on.

If the steps here don't work, or you are still not sure what to be doing, drop me a message here, or reach out to your support team where a CSE will be happy to look in to your specific setup.
Public