if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "THB",
"impressions": [
{
"id": "33691",
"name": "Trek 2021 Checkpoint SL Control Center Cover",
"price": "750.0",
"brand": "Trek",
"category": "E-bike controllers & parts",
"variant": "reddark",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "32467",
"name": "Trek 2020 Rail 29 สายเคเบิลไกด์เซ็นเซอร์ความเร็ว",
"price": "125.0",
"brand": "Trek",
"category": "Bike tools & maintenance",
"variant": "black",
"list": "CATEGORY",
"position": 2
}
,
{
"id": "42183",
"name": "อะแดปเตอร์เซ็นเซอร์ความเร็ว Trek 2023 Rail & Powerfly",
"price": "50.0",
"brand": "Trek",
"category": "E-bike controllers & parts",
"variant": "black",
"list": "CATEGORY",
"position": 3
}
,
{
"id": "42182",
"name": "อะแดปเตอร์เซ็นเซอร์ความเร็ว Trek-Diamant MY23",
"price": "75.0",
"brand": "Trek-Diamant",
"category": "E-bike controllers & parts",
"variant": "black",
"list": "CATEGORY",
"position": 4
}
]
}
});
} else {
console.log("dataLayer");
}