Visión general
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "MXN",
"impressions": [
{
"id": "36792",
"name": "Rail 7 Gen 3",
"price": "139999.0",
"brand": "Trek",
"category": "Electric mountain bikes",
"variant": "purpledark",
"list": "More Options",
"position": 1
}
,
{
"id": "37026",
"name": "Rail 9.7 Gen 4",
"price": "169999.0",
"brand": "Trek",
"category": "Electric mountain bikes",
"variant": "reddark",
"list": "More Options",
"position": 2
}
,
{
"id": "35036",
"name": "Rail 7 Gen 2",
"price": "100669.0",
"brand": "Trek",
"category": "Electric mountain bikes",
"variant": "bluedark_black",
"list": "More Options",
"position": 3
}
,
{
"id": "35037",
"name": "Rail 9.7 Gen 2",
"price": "119999.0",
"brand": "Trek",
"category": "Electric mountain bikes",
"variant": "greydark_black",
"list": "More Options",
"position": 4
}
]
}
});
} else {
console.log("dataLayer");
}