if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "NZD",
"impressions": [
{
"id": "41980",
"name": "Trek Oh Deer Beanie",
"price": "49.99",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "black",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "41982",
"name": "Trek Fraser Fir Beanie",
"price": "49.99",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "greendark",
"list": "CATEGORY",
"position": 2
}
,
{
"id": "41983",
"name": "Trek Label Fisherman Beanie",
"price": "49.99",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "red",
"list": "CATEGORY",
"position": 3
}
,
{
"id": "41981",
"name": "Trek Sunset Script Beanie",
"price": "49.99",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "bluedark",
"list": "CATEGORY",
"position": 4
}
]
}
});
} else {
console.log("dataLayer");
}