概要
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "JPY",
"impressions": [
{
"id": "45367",
"name": "Trek Trails Unisex Tシャツ",
"price": "2925.0",
"brand": "Trek",
"category": "T-Shirts",
"variant": "green",
"list": "More Options",
"position": 1
}
,
{
"id": "45368",
"name": "Trek Mosaic Unisex Tシャツ",
"price": "2925.0",
"brand": "Trek",
"category": "T-Shirts",
"variant": "white",
"list": "More Options",
"position": 2
}
,
{
"id": "41976",
"name": "Trek Bicycle Tonal Unisex T-Shirt",
"price": "1900.0",
"brand": "Trek",
"category": "T-Shirts",
"variant": "tan",
"list": "More Options",
"position": 3
}
,
{
"id": "37330",
"name": "トレック Basket Bike ウィメンズ Tシャツ",
"price": "1500.0",
"brand": "Trek",
"category": "T-Shirts",
"variant": "yellow",
"list": "More Options",
"position": 4
}
,
{
"id": "37333",
"name": "トレック Bee ユース Tシャツ",
"price": "1100.0",
"brand": "Trek",
"category": "T-Shirts",
"variant": "grey",
"list": "More Options",
"position": 5
}
]
}
});
} else {
console.log("dataLayer");
}