if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "USD",
"impressions": [
{
"id": "41982",
"name": "Trek Fraser Fir Beanie",
"price": "19.99",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "greendark",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "37341",
"name": "Trek Holiday Pom Beanie",
"price": "15.99",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "greendark",
"list": "CATEGORY",
"position": 2
}
,
{
"id": "45022",
"name": "100% Trek Factory Racing Pom Beanie",
"price": "22.0",
"brand": "100%",
"category": "Casual caps & hats",
"variant": "black",
"list": "CATEGORY",
"position": 3
}
]
}
});
} else {
console.log("dataLayer");
}