概述
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "CNY",
"impressions": [
{
"id": "23383",
"name": "Bontrager自行车清洁剂",
"price": "120.0",
"brand": "Bontrager",
"category": "Bike tools & maintenance",
"variant": "red",
"list": "More Options",
"position": 1
}
,
{
"id": "23386",
"name": "Bontrager 油脂",
"price": "88.0",
"brand": "Bontrager",
"category": "Bike tools & maintenance",
"variant": "black",
"list": "More Options",
"position": 2
}
,
{
"id": "23382",
"name": "Bontrager 除油剂",
"price": "160.0",
"brand": "Bontrager",
"category": "Bike tools & maintenance",
"variant": "white",
"list": "More Options",
"position": 3
}
,
{
"id": "23385",
"name": "Bontrager 装配润滑油",
"price": "118.0",
"brand": "Bontrager",
"category": "Bike tools & maintenance",
"variant": "black",
"list": "More Options",
"position": 4
}
,
{
"id": "23381",
"name": "Bontrager 链条润滑油",
"price": "90.0",
"brand": "Bontrager",
"category": "Bike tools & maintenance",
"variant": "black",
"list": "More Options",
"position": 5
}
,
{
"id": "32461",
"name": "Trek Supercaliber Strut Service Lubricant 10 Weight",
"price": "180.0",
"brand": "Maxima",
"category": "Bike tools & maintenance",
"variant": "black",
"list": "More Options",
"position": 6
}
]
}
});
} else {
console.log("dataLayer");
}