if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "USD",
"impressions": [
{
"id": "35178",
"name": "Top Fuel 9.7",
"price": "4844.99",
"brand": "Trek",
"category": "Cross Country mountain bikes",
"variant": "bluedark_blue",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "35070",
"name": "Top Fuel 7",
"price": "3246.99",
"brand": "Trek",
"category": "Cross Country mountain bikes",
"variant": "red",
"list": "CATEGORY",
"position": 2
}
]
}
});
} else {
console.log("dataLayer");
}