I'm implementing GA Enhanced E-commerce using the new gtag.js
library. I want to send information about product impressions and product clicks, following the documentation here: https://developers.google.com/analytics/devguides/collection/gtagjs/enhanced-ecommerce.
Everything works (I can see the data in GA), except for Product List Name.
The docs seem to be inconsistent in naming the property (sometimes it's called "list"
and sometimes "list_name"
) and none of them worked for me.
Here's my (simplified) code:
deals = [
{
"id": "18",
"name": "Some product",
"list": "All Deals", // also tried "list_name" here
"category": "Multiplatform",
"list_position": "1",
"price": "18,39",
"currency": "EUR",
"product_url": "https://www.amazon.com/someproduct",
},
...
]
...
// on page load
gtag('event', 'view_item_list', {
"items": deals
});
...
// on click
gtag('event', 'select_content', {
"content_type": "product",
"items": [
deals[0]
]
});
All the data successfully make their way to GA, but Product List Name shows (not set)
, no matter what:
Thanks for any idea on how to fix/debug this!