概述
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "CNY",
"impressions": [
{
"id": "41416",
"name": "Trek EcoTack 车把带",
"price": "268.0",
"brand": "Trek",
"category": "Bike handlebar grips & tape",
"variant": "white",
"list": "More Options",
"position": 1
}
,
{
"id": "23110",
"name": "Bontrager 凝胶把带",
"price": "158.0",
"brand": "Bontrager",
"category": "Bike handlebar grips & tape",
"variant": "blue",
"list": "More Options",
"position": 2
}
,
{
"id": "47896",
"name": "Trek Perf Line 车把带组",
"price": "198.0",
"brand": "Trek",
"category": "Bike handlebar grips & tape",
"variant": "black",
"list": "More Options",
"position": 3
}
,
{
"id": "47893",
"name": "Trek Gel Cork 把带套装",
"price": "158.0",
"brand": "Trek",
"category": "Bike handlebar grips & tape",
"variant": "pinkvisibility",
"list": "More Options",
"position": 4
}
,
{
"id": "14104",
"name": "Bontrager 凝胶把带",
"price": "118.0",
"brand": "Bontrager",
"category": "Bike handlebar grips & tape",
"variant": "purple",
"list": "More Options",
"position": 5
}
]
}
});
} else {
console.log("dataLayer");
}