if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "SGD",
"impressions": [
{
"id": "40819",
"name": "FX 3 Gen 4",
"price": "1499.0",
"brand": "Trek",
"category": "Fitness bikes",
"variant": "red",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "40815",
"name": "FX 2 Gen 4",
"price": "1199.0",
"brand": "Trek",
"category": "Fitness bikes",
"variant": "blue",
"list": "CATEGORY",
"position": 2
}
,
{
"id": "47256",
"name": "FX Sport 6",
"price": "4499.0",
"brand": "Trek",
"category": "Fitness bikes",
"variant": "bronze_black",
"list": "CATEGORY",
"position": 3
}
,
{
"id": "47243",
"name": "FX Sport 4",
"price": "2799.0",
"brand": "Trek",
"category": "Fitness bikes",
"variant": "black",
"list": "CATEGORY",
"position": 4
}
,
{
"id": "35787",
"name": "FX Sport 6",
"price": "4299.0",
"brand": "Trek",
"category": "Fitness bikes",
"variant": "black",
"list": "CATEGORY",
"position": 5
}
,
{
"id": "35001",
"name": "FX 1 Disc Gen 3",
"price": "899.0",
"brand": "Trek",
"category": "Fitness bikes",
"variant": "black",
"list": "CATEGORY",
"position": 6
}
]
}
});
} else {
console.log("dataLayer");
}