配置此事件时遇到真正的麻烦。我使用 Qubit.com 标签管理器,这是我用于“查看产品”事件的代码。
此事件未跟踪,我不知道为什么。这是代码 -
function () {
var _this = this;
console.log('1 FB ViewContent Start');
var product_ids = [];
if(universal_variable.transaction.line_items){
for (var i = 0; i < universal_variable.transaction.line_items.length; i++) {
product_ids.push(universal_variable.transaction.line_items[i].product.sku_code)
}
}
console.log('2 FB ViewContent Product List Compiled');
fbq('track', 'ViewContent', {
content_ids: product_ids,
content_type: 'product',
value: "" + _this.valueForToken("ORDER_TOTAL"),
currency: "" + _this.valueForToken("CURRENCY_CODE")
});
console.log('3 FB ViewContent Tracked');
}