if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "NZD",
"impressions": [
{
"id": "36569",
"name": "Trek Race Crew Merino Wool Cycling Socks",
"price": "44.99",
"brand": "Trek",
"category": "Men's cycling socks",
"variant": "black",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "36534",
"name": "Trek Race Crew Cycling Socks",
"price": "44.99",
"brand": "Trek",
"category": "Men's cycling socks",
"variant": "yellowvisibility",
"list": "CATEGORY",
"position": 2
}
]
}
});
} else {
console.log("dataLayer");
}