Visión general
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "USD",
"impressions": [
{
"id": "40810",
"name": "Verve 2 Lowstep Gen 5",
"price": "1199.99",
"brand": "Trek",
"category": "Comfort & recreation bikes",
"variant": "grey",
"list": "More Options",
"position": 1
}
,
{
"id": "32734",
"name": "Verve 2 Disc Lowstep Gen 4",
"price": "1089.99",
"brand": "Trek",
"category": "Comfort & recreation bikes",
"variant": "red",
"list": "More Options",
"position": 2
}
,
{
"id": "36454",
"name": "Verve 2 Lowstep Gen 4",
"price": "1089.99",
"brand": "Trek",
"category": "Comfort & recreation bikes",
"variant": "green",
"list": "More Options",
"position": 3
}
,
{
"id": "36453",
"name": "Verve 2 Gen 4",
"price": "1089.99",
"brand": "Trek",
"category": "Comfort & recreation bikes",
"variant": "black",
"list": "More Options",
"position": 4
}
,
{
"id": "36450",
"name": "Verve 1 Lowstep Gen 4",
"price": "899.99",
"brand": "Trek",
"category": "Comfort & recreation bikes",
"variant": "red",
"list": "More Options",
"position": 5
}
]
}
});
} else {
console.log("dataLayer");
}