if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "USD",
"impressions": [
{
"id": "36823",
"name": "Dual Sport 2 Gen 5",
"price": "649.93",
"brand": "Trek",
"category": "Dual Sport bikes",
"variant": "green",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "40826",
"name": "Dual Sport 3 Gen 5",
"price": "1049.99",
"brand": "Trek",
"category": "Dual Sport bikes",
"variant": "orange",
"list": "CATEGORY",
"position": 2
}
,
{
"id": "40824",
"name": "Dual Sport 2 Gen 5",
"price": "849.99",
"brand": "Trek",
"category": "Dual Sport bikes",
"variant": "red",
"list": "CATEGORY",
"position": 3
}
,
{
"id": "36824",
"name": "Dual Sport 1 Gen 5",
"price": "599.99",
"brand": "Trek",
"category": "Dual Sport bikes",
"variant": "red",
"list": "CATEGORY",
"position": 4
}
]
}
});
} else {
console.log("dataLayer");
}