概述
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "CNY",
"impressions": [
{
"id": "36569",
"name": "Trek Race Crew 美利奴羊毛骑行袜",
"price": "168.0",
"brand": "Trek",
"category": "Men's cycling socks",
"variant": "black",
"list": "More Options",
"position": 1
}
,
{
"id": "47321",
"name": "Rapha Pro Team 骑行袜",
"price": "220.0",
"brand": "Rapha",
"category": "Men's cycling socks",
"variant": "white",
"list": "More Options",
"position": 2
}
,
{
"id": "47322",
"name": "Rapha 徽标骑行袜",
"price": "150.0",
"brand": "Rapha",
"category": "Men's cycling socks",
"variant": "white",
"list": "More Options",
"position": 3
}
,
{
"id": "36534",
"name": "Trek Race Crew 骑行袜",
"price": "158.0",
"brand": "Trek",
"category": "Men's cycling socks",
"variant": "yellowvisibility",
"list": "More Options",
"position": 4
}
,
{
"id": "46741",
"name": "Santini Lidl-Trek 车队骑行袜",
"price": "158.0",
"brand": "Santini",
"category": "Men's cycling socks",
"variant": "white",
"list": "More Options",
"position": 5
}
,
{
"id": "36533",
"name": "Trek Race Quarter 骑行袜",
"price": "148.0",
"brand": "Trek",
"category": "Men's cycling socks",
"variant": "yellowvisibility",
"list": "More Options",
"position": 6
}
,
{
"id": "37760",
"name": "Santini Trek-Segafredo Women's Team Cycling Socks",
"price": "158.0",
"brand": "Santini",
"category": "Cycling socks",
"variant": "white_bluelight",
"list": "More Options",
"position": 7
}
,
{
"id": "35102",
"name": "Bontrager Race Merino 羊毛自行车水手袜",
"price": "168.0",
"brand": "Bontrager",
"category": "Cycling socks",
"variant": "black",
"list": "More Options",
"position": 8
}
]
}
});
} else {
console.log("dataLayer");
}