if (typeof dataLayer !== "undefined") { dataLayer.push({ "ecommerce": { "currency": "PLN", "impressions": [ { "id": "36232", "name": "Mostek tylny Electra Tandem", "price": "190.0", "brand": "Electra", "category": "Bike stems & accessories", "variant": "greylight", "list": "CATEGORY", "position": 1 } , { "id": "37594", "name": "Mostek wpuszczany do rowerów dziecięcych Electra", "price": "84.9", "brand": "Electra", "category": "Bike stems & accessories", "variant": "greylight", "list": "CATEGORY", "position": 2 } ] } }); } else { console.log("dataLayer"); }