概述
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": "40457",
"name": "Trek Blendr Fendr",
"price": "118.0",
"brand": "Bontrager",
"category": "Bike fenders & accessories",
"variant": "black",
"list": "More Options",
"position": 2
}
,
{
"id": "24663",
"name": "Bontrager Blendr车座配件支架",
"price": "40.0",
"brand": "Bontrager",
"category": "Bike lights",
"variant": "black_grey",
"list": "More Options",
"position": 3
}
,
{
"id": "26615",
"name": "Bontrager Fitness Gel Saddle Cover",
"price": "138.0",
"brand": "Bontrager",
"category": "Bike saddles",
"variant": "black",
"list": "More Options",
"position": 4
}
,
{
"id": "44844",
"name": "Trek Blendr Saddle Bag Mount",
"price": "108.0",
"brand": "Trek",
"category": "Bike bags",
"variant": "black",
"list": "More Options",
"position": 5
}
,
{
"id": "26951",
"name": "Bontrager Hilo 车座压片套件",
"price": "40.0",
"brand": "Bontrager",
"category": "Bike saddles",
"variant": "black",
"list": "More Options",
"position": 6
}
]
}
});
} else {
console.log("dataLayer");
}