Visión general
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "MXN",
"impressions": [
{
"id": "40455",
"name": "Trek Fetch+ 4 Head Badge",
"price": "1051.0",
"brand": "Trek",
"category": "Bike frame parts",
"variant": "grey_black",
"list": "More Options",
"position": 1
}
,
{
"id": "32096",
"name": "Calcomanía de logo para tijera inferior trasera Trek Top Fuel 29 2020",
"price": "545.0",
"brand": "Trek",
"category": "Bike frame parts",
"variant": "black",
"list": "More Options",
"position": 2
}
,
{
"id": "34817",
"name": "Electra Headtube Badge",
"price": "261.0",
"brand": "Electra",
"category": "Bike frame parts",
"variant": "greylight",
"list": "More Options",
"position": 3
}
]
}
});
} else {
console.log("dataLayer");
}