我正在尝试正确配置 Google Analytics增强型电子商务,并且我使用Tag Assistant (by Google)来检查错误和警告。
在我的电子商务中,当我导航到包含产品列表的网页,在一个页面中显示超过12种产品时,我从Tag Assistant收到此错误:
未检测到HTTP响应
经过大量测试后我注意到了:
在一个页面中显示较少的产品(让我们说8个产品而不是12个)错误消失。
每页留下12个产品,但删除了使用ec:addImpression
命令发送的一些数据(例如删除category
和brand
)错误消失,但它再次显示24个产品(或更多)每页。
当我收到上述错误时,这是在页面上执行的代码,页面内的每个产品都有一个ec:addImpression
命令:
ga("create", "UA-NNNNNNN-1", "auto")
ga("require", "ec")
ga("set", "&cu", "EUR")
ga("ec:addImpression", {id: "488", name: "Light Coral", list: "Cateogry Page", category: "Some/Category/Path", price: "4.50", brand: "Coral", position: 1})
ga("ec:addImpression", {id: "487", name: "Light Purple", list: "Cateogry Page", category: "Some/Category/Path", price: "4.50", brand: "Purple", position: 2})
ga("ec:addImpression", {id: "489", name: "Light Pink", list: "Cateogry Page", category: "Some/Category/Path", price: "4.50", brand: "Pink", position: 3})
ga("ec:addImpression", {id: "491", name: "Light Red", list: "Cateogry Page", category: "Some/Category/Path", price: "4.50", brand: "Red", position: 4})
ga("ec:addImpression", {id: "717", name: "Light Blue", list: "Cateogry Page", category: "Some/Category/Path", price: "6.00", brand: "Blue", position: 5})
ga("ec:addImpression", {id: "768", name: "Light Pink 2", list: "Cateogry Page", category: "Some/Category/Path", price: "8.00", brand: "Pink", position: 6})
ga("ec:addImpression", {id: "92", name: "Light Green", list: "Cateogry Page", category: "Some/Category/Path", price: "5.95", brand: "Green", position: 7})
// ...
ga("send", "pageview")
有人遇到过同样的问题吗?
可能是错误的原因是什么?