Overview
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": "More Options",
"position": 1
}
,
{
"id": "37335",
"name": "Trek Diamond Patch Hat",
"price": "19.99",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "bluedark",
"list": "More Options",
"position": 2
}
,
{
"id": "37341",
"name": "Trek Holiday Pom Beanie",
"price": "19.93",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "greendark",
"list": "More Options",
"position": 3
}
,
{
"id": "45021",
"name": "100% Trek Factory Racing 5 Panel Hat",
"price": "35.99",
"brand": "100%",
"category": "Casual caps & hats",
"variant": "black",
"list": "More Options",
"position": 4
}
,
{
"id": "45022",
"name": "100% Trek Factory Racing Pom Beanie",
"price": "29.99",
"brand": "100%",
"category": "Casual caps & hats",
"variant": "black",
"list": "More Options",
"position": 5
}
]
}
});
} else {
console.log("dataLayer");
}