Datalayer.ecommerce.items object is polluted with previous data
-
Hello Thomas (and all),
I’m asking for your support as, in some steps of user journey in our website, GTM does not get the datalayer’s content as it should has been.
From TAG Assistant
1. view_item
One item object is expected within items but three item objects are populated instead.
API calldataLayer.push({ event: "view_item", ecommerce: { currency: "EUR", value: 30, items: [ { item_id: "LIS-PINK", item_name: "Pink Lisianthus", item_brand: "", price: 30, item_category: "Flowers", google_business_vertical: "retail", id: "LIS-PINK" } ] }, gtm.uniqueEventId: 26 })
Datalayer
{ event: "view_item", gtm: {uniqueEventId: 26, start: 1645788119312}, visitorDoNotTrack: 0, visitorLoginState: "logged-out", productRatingCounts: [], productAverageRating: 0, productReviewCount: 0, productType: "simple", productIsVariable: 0, ecommerce: { currencyCode: "EUR", detail: { products: [ { id: "LIS-PINK", name: "Pink Lisianthus", sku: "LIS-PINK", category: "Flowers", price: 30, stocklevel: null, brand: "" } ] }, impressions: [ { name: "Rose Bouquet Kahala", id: "ROSE-K", price: "36.00", category: "Flowers", position: "1", list: "Related Products", stocklevel: "", brand: "" }, { name: "Ranunculus", id: "RANUNCULUS", price: "15.00", category: "This week's special", position: "2", list: "Related Products", stocklevel: "", brand: "" }, { name: "Tulips Yellow", id: "TULIP-YEL", price: "18.00", category: "Flowers", position: "3", list: "Related Products", stocklevel: "", brand: "" } ], currency: "EUR", items: [ { item_id: "LIS-PINK", item_name: "Pink Lisianthus", item_brand: "", price: 30, item_category: "Flowers", item_list_name: "Related Products", index: "1", google_business_vertical: "retail", id: "LIS-PINK" }, { item_id: "RANUNCULUS", item_name: "Ranunculus", item_brand: "", price: "15.00", item_category: "This week's special", item_list_name: "Related Products", index: "2", google_business_vertical: "retail", id: "RANUNCULUS" }, { item_id: "TULIP-YEL", item_name: "Tulips Yellow", item_brand: "", price: "18.00", item_category: "Flowers", item_list_name: "Related Products", index: "3", google_business_vertical: "retail", id: "TULIP-YEL" } ], value: 30 } }
The same happens with select_item and addToCart . Seems like dataLayer[‘ecommerce’] could not be initialized and so is polluted with previous data pushes.
I would appreciate any help provided
Thank you in advance
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Datalayer.ecommerce.items object is polluted with previous data’ is closed to new replies.