if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "USD",
"impressions": [
{
"id": "35003",
"name": "FX 2 Disc Gen 3",
"price": "713.99",
"brand": "Trek",
"category": "Fitness bikes",
"variant": "red",
"list": "CATEGORY",
"position": 1
}
,
{
"id": "35021",
"name": "FX 3 Disc Gen 3",
"price": "1259.99",
"brand": "Trek",
"category": "Fitness bikes",
"variant": "black",
"list": "CATEGORY",
"position": 2
}
]
}
});
} else {
console.log("dataLayer");
}