The following is the Google Analytics JavaScript code executed on an e-commerce (captured with GA Debug), for a quite simple purchase process.
1) Navigate to the Home Page
ga("create", "UA-NNNNNNN-1", "auto")
ga("require", "ec")
ga("require", "ec")
ga("require", "ec")
ga("set", "&cu", "EUR")
ga("ec:addImpression", {id: "488", name: "Light Coral", list: "Home Page list", category: "Some/Category/Path", price: "4.50", brand: "Coral", position: 1})
ga("ec:addImpression", {id: "487", name: "Light Purple", list: "Home Page list", category: "Some/Category/Path", price: "4.50", brand: "Purple", position: 2})
ga("ec:addImpression", {id: "489", name: "Light Pink", list: "Home Page list", category: "Some/Category/Path", price: "4.50", brand: "Pink", position: 3})
ga("ec:addImpression", {id: "491", name: "Light Red", list: "Home Page list", category: "Some/Category/Path", price: "4.50", brand: "Red", position: 4})
ga("ec:addImpression", {id: "717", name: "Light Blue", list: "Home Page list", category: "Some/Category/Path", price: "6.00", brand: "Blue", position: 5})
ga("ec:addImpression", {id: "768", name: "Light Pink 2", list: "Home Page list", category: "Some/Category/Path", price: "8.00", brand: "Pink", position: 6})
ga("ec:addImpression", {id: "92", name: "Light Green", list: "Home Page list", category: "Some/Category/Path", price: "5.95", brand: "Green", position: 7})
ga("ec:addImpression", {id: "712", name: "Light Orange", list: "Home Page list", category: "Some/Category/Path", price: "6.50", brand: "Orange", position: 8})
ga("send", "pageview")
2) Click on one product (on the Home Page) > Open the product page
ga("ec:addProduct", {id: "717", name: "Light Blue", category: "Some/Category/Path", price: "6.00", brand: "Blue", position: 5})
ga("ec:setAction", "click", {list: "Home Page list"})
ga("send", "event", "UX", "click", "Home Page list")
ga("create", "UA-NNNNNNNN-1", "auto")
ga("require", "ec")
ga("require", "ec")
ga("require", "ec")
ga("require", "ec")
ga("require", "ec")
ga("set", "&cu", "EUR")
ga("ec:addProduct", {id: "717", name: "Light Blue", brand: "Blue", category: "Some/Category/Path", price: "6"})
ga("ec:setAction", "detail")
ga("send", "pageview")
3) Add the product to the cart
ga("ec:addProduct", {id: "717", name: "Light Blue", brand: "Blue", category: "Some/Category/Path", price: "6", quantity: "1"})
ga("ec:setAction", "add")
ga("send", "event", "UX", "click", "Add to cart")
4) Go to the checkout page
ga("create", "UA-NNNNNNNN-1", "auto")
ga("require", "ec")
ga("require", "ec")
ga("require", "ec")
ga("set", "&cu", "EUR")
ga("ec:addProduct", {id: "717", name: "Light Blue", price: "6.00", brand: "Blue", category: "Some/Category/Path", quantity: 1})
ga("ec:setAction", "checkout", {step: 1})
ga("send", "pageview")
5) Follow the checkout process
ga("ec:addProduct", {id: "717", name: "Light Blue", price: "6.00", brand: "Blue", category: "Some/Category/Path", quantity: 1})
ga("ec:setAction", "checkout", {step: 2})
ga("send", "pageview")
ga("ec:addProduct", {id: "717", name: "Light Blue", price: "6.00", brand: "Blue", category: "Some/Category/Path", quantity: 1})
ga("ec:setAction", "checkout", {step: 3})
ga("send", "pageview")
ga("ec:setAction", "checkout_option", {step: 3, option: "Send to another address"})
ga("send", "event", "Checkout", "Option")
ga("ec:addProduct", {id: "717", name: "Light Blue", price: "6.00", brand: "Blue", category: "Some/Category/Path", quantity: 1})
ga("ec:setAction", "checkout", {step: 4})
ga("send", "pageview")
ga("ec:setAction", "checkout_option", {step: 4, option: "BRT"})
ga("send", "event", "Checkout", "Option")
ga("ec:addProduct", {id: "717", name: "Light Blue", price: "6.00", brand: "Blue", category: "Some/Category/Path", quantity: 1})
ga("ec:setAction", "checkout", {step: 5})
ga("send", "pageview")
ga("ec:setAction", "checkout_option", {step: 5, option: "banktransfer"})
ga("send", "event", "Checkout", "Option")
ga("ec:addProduct", {id: "717", name: "Light Blue", price: "6.00", brand: "Blue", category: "Some/Category/Path", quantity: 1})
ga("ec:setAction", "checkout", {step: 6})
ga("send", "pageview")
6) Conclude the purchase
ga("create", "UA-NNNNNNNN-1", "auto")
ga("require", "ec")
ga("require", "ec")
ga("require", "ec")
ga("require", "ec")
ga("set", "&cu", "EUR")
ga("ec:addProduct", {id: "717", name: "Light Blue", price: "6.00", brand: "Blue", category: "Some/Category/Path", quantity: 1})
ga("ec:setAction", "purchase", {id: "16O00000011", revenue: "16.00", shipping: "10.00"})
ga("send", "pageview")
The problem
From Google Analytics dashboard, within the Ecommerce section, when I go on the Product Performance card (Product Performance > Product name > Product SKU) I have a (not set)
value under Product Category:
While in Overview > Product Category I can see the right Product Category of the product:
Furthermore, if I go on Product Performance, select Primary Dimension: Product Category (Enhanced Ecommerce), then click on the category, I can see the product in this table.
What am I doing wrong?
Why, inside the product performance card, is the Product Category not set
?