if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "USD",
"impressions": [
{
"id": "36791",
"name": "Rail 5 Gen 3",
"price": "7399.99",
"brand": "Trek",
"category": "Electric mountain bikes",
"variant": "reddark",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "35032",
"name": "Rail 5 Gen 2",
"price": "7399.99",
"brand": "Trek",
"category": "Electric mountain bikes",
"variant": "red_greydark",
"list": "CATEGORY",
"position": 2
}
,
{
"id": "36998",
"name": "Powerfly FS 4 Gen 3",
"price": "5999.99",
"brand": "Trek",
"category": "Electric mountain bikes",
"variant": "red_black",
"list": "CATEGORY",
"position": 3
}
,
{
"id": "32759",
"name": "Powerfly FS 4 Gen 2",
"price": "5999.99",
"brand": "Trek",
"category": "Electric mountain bikes",
"variant": "grey_black",
"list": "CATEGORY",
"position": 4
}
,
{
"id": "32844",
"name": "Powerfly 4 Gen 3",
"price": "4999.99",
"brand": "Trek",
"category": "Electric mountain bikes",
"variant": "grey_black",
"list": "CATEGORY",
"position": 5
}
]
}
});
} else {
console.log("dataLayer");
}