Item_id automatically changes to content_id

Hey!

I use the Stape app for the data layer push on Shopify.

There is an item_id in the data layer.

But now when I look at the variable “DLV - ecommerce.items”, the item_id automatically becomes the content_id and I just don’t understand why. This is driving me crazy…Any idea why this is happening?
Thanks!


Hello, it’s pretty hard to say w/o having the container to play with, but most likely there’s a piece of JS somewhere in your container that messes with items array, so I would first of all look at where that DLV variable of yours is referenced.

Unfortunately I couldn’t find anything like that, but I solved it with a JS code…Thanks!

"
// Iterate over each item and extract all information
items.forEach(function(item) {
var itemInfo = {
item_id: item.item_id || item.content_id || ‘’,
"