概述
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "CNY",
"impressions": [
{
"id": "33691",
"name": "Trek 2021 Checkpoint SL Control Center Cover",
"price": "150.0",
"brand": "Trek",
"category": "E-bike controllers & parts",
"variant": "orange",
"list": "More Options",
"position": 1
}
,
{
"id": "33620",
"name": "Trek 2021 Rail Gen 2 Bosch Kiox Display Mount",
"price": "130.0",
"brand": "Trek",
"category": "E-bike controllers & parts",
"variant": "black",
"list": "More Options",
"position": 2
}
,
{
"id": "48485",
"name": "Trek 2025 Slash+ Carbon Bottom Bracket Wiring Access Panel",
"price": "68.0",
"brand": "Trek",
"category": "Bike frame parts",
"variant": "black",
"list": "More Options",
"position": 3
}
,
{
"id": "32467",
"name": "Trek 2020 Rail 29 Speed Sensor Cable Guide",
"price": "30.0",
"brand": "Trek",
"category": "Bike tools & maintenance",
"variant": "black",
"list": "More Options",
"position": 4
}
,
{
"id": "42183",
"name": "Trek 2023 Rail & Powerfly Speed Sensor Adapter",
"price": "10.0",
"brand": "Trek",
"category": "E-bike controllers & parts",
"variant": "black",
"list": "More Options",
"position": 5
}
,
{
"id": "44342",
"name": "Trek-Diamant Speed Sensor for Bosch Gen 4",
"price": "270.0",
"brand": "Trek-Diamant",
"category": "E-bike controllers & parts",
"variant": "black",
"list": "More Options",
"position": 6
}
,
{
"id": "42182",
"name": "Trek-Diamant Speed Sensor Adapter MY23",
"price": "20.0",
"brand": "Trek-Diamant",
"category": "E-bike controllers & parts",
"variant": "black",
"list": "More Options",
"position": 7
}
]
}
});
} else {
console.log("dataLayer");
}