if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "NZD",
"impressions": [
{
"id": "35003",
"name": "FX 2 Disc Gen 3",
"price": "1199.0",
"brand": "Trek",
"category": "Fitness bikes",
"variant": "greydark",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "35001",
"name": "FX 1 Disc Gen 3",
"price": "999.0",
"brand": "Trek",
"category": "Fitness bikes",
"variant": "reddark",
"list": "CATEGORY",
"position": 2
}
]
}
});
} else {
console.log("dataLayer");
}