if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "EUR",
"impressions": [
{
"id": "45021",
"name": "100% Trek Factory Racing 5 panel cap",
"price": "34.99",
"brand": "100%",
"category": "Casual caps & hats",
"variant": "black",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "45022",
"name": "100% Trek Factory Racing beanie",
"price": "29.99",
"brand": "100%",
"category": "Casual caps & hats",
"variant": "black",
"list": "CATEGORY",
"position": 2
}
]
}
});
} else {
console.log("dataLayer");
}