概述
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": "26798",
"name": "Bontrager Grease Gun",
"price": "280.0",
"brand": "Bontrager",
"category": "Bike tools & maintenance",
"variant": "greylight",
"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");
}