【发布时间】:2017-09-07 17:03:23
【问题描述】:
从“简单”数据层创建 GTM 变量没有问题, 示例:
"transactionEntity": "ORDER",
"transactionId": "193552702",
但无法理解如何从数组中获取值。 基本上我需要从这些 dataLayer 表中获取 ID 值:
"transactionProducts": [
{
"id": "5",
"sku": "black-handbag",
"price": 170,
"priceexcludingtax": "0.00",
"tax": "0.00",
"taxrate": 0,
"type": "bundle",
"category": "",
"quantity": 1
},
{
"id": "3",
"sku": "red-handbag",
"price": 120,
"priceexcludingtax": "0.00",
"tax": "0.00",
"taxrate": 0,
"type": "bundle",
"category": "",
"quantity": 1
}
],
并使用这种格式将它们传递给 FB 像素:
content_ids: ['5', '3'],
【问题讨论】: