概要
if (typeof dataLayer !== "undefined") {
dataLayer.push({
"ecommerce": {
"currency": "JPY",
"impressions": [
{
"id": "41980",
"name": "Trek Oh Deer Beanie",
"price": "2900.0",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "black",
"list": "More Options",
"position": 1
}
,
{
"id": "41982",
"name": "Trek Fraser Fir Beanie",
"price": "2900.0",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "greendark",
"list": "More Options",
"position": 2
}
,
{
"id": "41983",
"name": "Trek Label Fisherman Beanie",
"price": "2900.0",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "red",
"list": "More Options",
"position": 3
}
,
{
"id": "41981",
"name": "Trek Sunset Script Beanie",
"price": "2900.0",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "bluedark",
"list": "More Options",
"position": 4
}
,
{
"id": "37335",
"name": "トレック Diamond Patch ハット",
"price": "1900.0",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "bluedark",
"list": "More Options",
"position": 5
}
,
{
"id": "37341",
"name": "トレック Holiday Pom ビーニー",
"price": "1500.0",
"brand": "Trek",
"category": "Casual caps & hats",
"variant": "greendark",
"list": "More Options",
"position": 6
}
]
}
});
} else {
console.log("dataLayer");
}