if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "ZAR",
"impressions": [
{
"id": "35116",
"name": "Roscoe 7",
"price": "20000.0",
"brand": "Trek",
"category": "Trail mountain bikes",
"variant": "black",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "35870",
"name": "Roscoe Frame Set",
"price": "10000.0",
"brand": "Trek",
"category": "Trail mountain bikes",
"variant": "black",
"list": "CATEGORY",
"position": 2
}
]
}
});
} else {
console.log("dataLayer");
}