if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "CAD",
"impressions": [
{
"id": "41982",
"name": "Trek Fraser Fir Beanie",
"price": "24.93",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "greendark",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "37335",
"name": "Casquette Trek Diamond Patch",
"price": "19.99",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "bluedark",
"list": "CATEGORY",
"position": 2
}
,
{
"id": "37341",
"name": "Bonnet à pompon Trek Holiday",
"price": "19.93",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "greendark",
"list": "CATEGORY",
"position": 3
}
,
{
"id": "45021",
"name": "Casquette à 5 pans Trek Factory Racing 100%",
"price": "35.99",
"brand": "100%",
"category": "Casual caps & hats",
"variant": "black",
"list": "CATEGORY",
"position": 4
}
,
{
"id": "45022",
"name": "Bonnet à pompon Trek Factory Racing 100%",
"price": "29.99",
"brand": "100%",
"category": "Casual caps & hats",
"variant": "black",
"list": "CATEGORY",
"position": 5
}
]
}
});
} else {
console.log("dataLayer");
}