if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "NZD",
"impressions": [
{
"id": "40649",
"name": "Electra Banana Dance Socks",
"price": "39.99",
"brand": "Electra",
"category": "Men's cycling socks",
"variant": "blue",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "40651",
"name": "Electra Tiki Time Socks",
"price": "39.99",
"brand": "Electra",
"category": "Men's cycling socks",
"variant": "reddark",
"list": "CATEGORY",
"position": 2
}
,
{
"id": "40653",
"name": "Electra Richie Socks",
"price": "39.99",
"brand": "Electra",
"category": "Men's cycling socks",
"variant": "grey",
"list": "CATEGORY",
"position": 3
}
]
}
});
} else {
console.log("dataLayer");
}