if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "SGD",
"impressions": [
{
"id": "40455",
"name": "Trek Fetch+ 4 Head Badge",
"price": "100.0",
"brand": "Trek",
"category": "Bike frame parts",
"variant": "grey_black",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "14807",
"name": "Trek Head Badges",
"price": "20.0",
"brand": "Trek",
"category": "Bike frame parts",
"variant": "greylight",
"list": "CATEGORY",
"position": 2
}
]
}
});
} else {
console.log("dataLayer");
}