概述
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "CNY",
"impressions": [
{
"id": "44940",
"name": "Trek Ballista Mips Helmet Fit System",
"price": "188.0",
"brand": "Trek",
"category": "Bike helmets",
"variant": "black",
"list": "More Options",
"position": 1
}
,
{
"id": "44112",
"name": "Trek Velocis Mips Helmet Fit System",
"price": "170.0",
"brand": "Trek",
"category": "Bike helmets",
"variant": "black",
"list": "More Options",
"position": 2
}
,
{
"id": "45320",
"name": "Trek Kids Bike Helmet Fit System - Headmaster 3",
"price": "108.0",
"brand": "Trek",
"category": "Bike helmets",
"variant": "black",
"list": "More Options",
"position": 3
}
,
{
"id": "44096",
"name": "Trek Bike Helmet Fit System - Headmaster 3",
"price": "60.0",
"brand": "Trek",
"category": "Bike helmets",
"variant": "black",
"list": "More Options",
"position": 4
}
,
{
"id": "37951",
"name": "Bontrager Circuit WaveCel BOA Helmet Fit System",
"price": "120.0",
"brand": "Bontrager",
"category": "Bike helmets",
"variant": "black",
"list": "More Options",
"position": 5
}
,
{
"id": "14224",
"name": "Bontrager Bike Helmet Fit System - Micro Manager II",
"price": "121.0",
"brand": "Bontrager",
"category": "Bike helmets",
"variant": "black",
"list": "More Options",
"position": 6
}
,
{
"id": "22617",
"name": "Bontrager Velocis Mips BOA 自行车头盔适配系统",
"price": "215.0",
"brand": "Bontrager",
"category": "Bike helmets",
"variant": "black",
"list": "More Options",
"position": 7
}
,
{
"id": "22317",
"name": "Bontrager BOA 自行车头盔适配系统",
"price": "215.0",
"brand": "Bontrager",
"category": "Bike helmets",
"variant": "black",
"list": "More Options",
"position": 8
}
,
{
"id": "28845",
"name": "Bontrager WaveCel BOA 自行车头盔适配系统",
"price": "140.0",
"brand": "Bontrager",
"category": "Bike helmets",
"variant": "black",
"list": "More Options",
"position": 9
}
,
{
"id": "32639",
"name": "Bontrager Dialed 自行车头盔适配系统",
"price": "115.0",
"brand": "Bontrager",
"category": "Bike helmets",
"variant": "black",
"list": "More Options",
"position": 10
}
,
{
"id": "33637",
"name": "Bontrager Jet WaveCel 自行车头盔适配系统",
"price": "100.0",
"brand": "Bontrager",
"category": "Bike helmets",
"variant": "black",
"list": "More Options",
"position": 11
}
]
}
});
} else {
console.log("dataLayer");
}