Visión general
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "USD",
"impressions": [
{
"id": "36826",
"name": "Dual Sport 3 Gen 5",
"price": "1599.99",
"brand": "Trek",
"category": "Dual Sport bikes",
"variant": "green",
"list": "More Options",
"position": 1
}
,
{
"id": "36823",
"name": "Dual Sport 2 Gen 5",
"price": "1239.99",
"brand": "Trek",
"category": "Dual Sport bikes",
"variant": "green",
"list": "More Options",
"position": 2
}
,
{
"id": "35044",
"name": "Dual Sport 2 Gen 4",
"price": "1149.99",
"brand": "Trek",
"category": "Dual Sport bikes",
"variant": "red",
"list": "More Options",
"position": 3
}
,
{
"id": "40826",
"name": "Dual Sport 3 Gen 5",
"price": "1599.99",
"brand": "Trek",
"category": "Dual Sport bikes",
"variant": "grey",
"list": "More Options",
"position": 4
}
,
{
"id": "36824",
"name": "Dual Sport 1 Gen 5",
"price": "1069.99",
"brand": "Trek",
"category": "Dual Sport bikes",
"variant": "red",
"list": "More Options",
"position": 5
}
,
{
"id": "35060",
"name": "Dual Sport 1 Gen 4",
"price": "989.99",
"brand": "Trek",
"category": "Dual Sport bikes",
"variant": "greylight",
"list": "More Options",
"position": 6
}
]
}
});
} else {
console.log("dataLayer");
}