概述
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "CNY",
"impressions": [
{
"id": "41674",
"name": "Trek Blendr 车座包",
"price": "488.0",
"brand": "Trek",
"category": "Bike bags",
"variant": "black",
"list": "More Options",
"position": 1
}
,
{
"id": "35560",
"name": "Bontrager Adventure 车座包",
"price": "888.0",
"brand": "Bontrager",
"category": "Bike bags",
"variant": "black",
"list": "More Options",
"position": 2
}
,
{
"id": "30760",
"name": "Bontrager Flat Pack",
"price": "298.0",
"brand": "Bontrager",
"category": "Bike bags",
"variant": "black",
"list": "More Options",
"position": 3
}
,
{
"id": "14411",
"name": "Bontrager Elite Seat Pack",
"price": "138.0",
"brand": "Bontrager",
"category": "Bike bags",
"variant": "black",
"list": "More Options",
"position": 4
}
,
{
"id": "25934",
"name": "Bontrager Quick Cleat 总成",
"price": "44.0",
"brand": "Bontrager",
"category": "Bike bags",
"variant": "black",
"list": "More Options",
"position": 5
}
]
}
});
} else {
console.log("dataLayer");
}