if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "USD",
"impressions": [
{
"id": "49668",
"name": "FX+ 1S",
"price": "2999.99",
"brand": "Trek",
"category": "Electric hybrid bikes",
"variant": "black",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "57380",
"name": "Marlin+ 6",
"price": "4499.99",
"brand": "Trek",
"category": "Electric mountain bikes",
"variant": "green",
"list": "CATEGORY",
"position": 2
}
,
{
"id": "28299",
"name": "Verve+ 2 Gen 2",
"price": "3799.99",
"brand": "Trek",
"category": "Electric hybrid bikes",
"variant": "grey",
"list": "CATEGORY",
"position": 3
}
]
}
});
} else {
console.log("dataLayer");
}