if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "USD",
"impressions": [
{
"id": "47071",
"name": "Checkpoint SL 5 AXS Gen 3",
"price": "4699.99",
"brand": "Trek",
"category": "Gravel bikes",
"variant": "red_greendark",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "41513",
"name": "Checkpoint ALR 4",
"price": "2249.99",
"brand": "Trek",
"category": "Gravel bikes",
"variant": "grey",
"list": "CATEGORY",
"position": 2
}
]
}
});
} else {
console.log("dataLayer");
}