Visión general
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "USD",
"impressions": [
{
"id": "46151",
"name": "Madone SLR 9 AXS Gen 8",
"price": "19999.99",
"brand": "Trek",
"category": "Performance road bikes",
"variant": "white_blue",
"list": "More Options",
"position": 1
}
,
{
"id": "46707",
"name": "Madone SLR 9 Gen 8",
"price": "18279.99",
"brand": "Trek",
"category": "Performance road bikes",
"variant": "white_blue",
"list": "More Options",
"position": 2
}
,
{
"id": "46687",
"name": "Madone SLR 7 Gen 8",
"price": "12599.99",
"brand": "Trek",
"category": "Performance road bikes",
"variant": "red",
"list": "More Options",
"position": 3
}
,
{
"id": "37025",
"name": "Madone SLR 7 Gen 7",
"price": "12199.99",
"brand": "Trek",
"category": "Performance road bikes",
"variant": "red",
"list": "More Options",
"position": 4
}
,
{
"id": "46775",
"name": "Cuadro Madone SLR Gen 8",
"price": "8399.99",
"brand": "Trek",
"category": "Performance road bikes",
"variant": "blue",
"list": "More Options",
"position": 5
}
]
}
});
} else {
console.log("dataLayer");
}