if (typeof dataLayer !== "undefined") { dataLayer.push({ "ecommerce": { "currency": "USD", "impressions": [ { "id": "44265", "name": "Garmin HRM Pro Plus Heart Rate Monitor", "price": "129.99", "brand": "Garmin", "category": "Bike computers & GPS", "variant": "black", "list": "CATEGORY", "position": 1 } , { "id": "37949", "name": "Garmin Forerunner 945 LTE Smartwatch", "price": "649.99", "brand": "Garmin", "category": "Bike computers & GPS", "variant": "black", "list": "CATEGORY", "position": 2 } , { "id": "44103", "name": "Garmin Forerunner 955 Smartwatch", "price": "499.99", "brand": "Garmin", "category": "Bike computers & GPS", "variant": "black", "list": "CATEGORY", "position": 3 } , { "id": "48875", "name": "Garmin Forerunner 165 Smartwatch", "price": "249.99", "brand": "Garmin", "category": "Bike computers & GPS", "variant": "black", "list": "CATEGORY", "position": 4 } , { "id": "14602", "name": "Bontrager ANT+/BLE Softstrap Heart Rate Belt", "price": "79.99", "brand": "Bontrager", "category": "Bike computers & GPS", "variant": "black", "list": "CATEGORY", "position": 5 } , { "id": "21492", "name": "Bontrager Softstrap Heart Rate Belt", "price": "37.99", "brand": "Bontrager", "category": "Bike computers & GPS", "variant": "black", "list": "CATEGORY", "position": 6 } ] } }); } else { console.log("dataLayer"); }