if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "ZAR",
"impressions": [
{
"id": "35069",
"name": "X-Caliber 8",
"price": "20000.0",
"brand": "Trek",
"category": "Cross Country mountain bikes",
"variant": "greydark",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "35867",
"name": "X-Caliber Frame Set",
"price": "10000.0",
"brand": "Trek",
"category": "Cross Country mountain bikes",
"variant": "greydark",
"list": "CATEGORY",
"position": 2
}
]
}
});
} else {
console.log("dataLayer");
}