我将此代码从索引正文移动到我的转换/感谢页面的 html 编辑器中。这个 Criteo Javascript 应该将订单详细信息推送到他们的数据库。出了什么问题?
<!-- Conversionpage htmlblock in js test -->
<body onload="fireConversion()">
<script type="text/javascript" src="//static.criteo.net/js/ld/ld.js" async="true"></script>
<script type="text/javascript">
function fireConversion() {
var order_info = JSON.parse(ORDER_JSON).order_rows;
var basketproducts = [];
for(var i=0;i<order_info.length;i++) {
basketproducts.push( { id: order_info[i].product_id, price: order_info[i].price, quantity: order_info[i].count});
}
var orderid = '[OrderNumber]';
window.criteo_q = window.criteo_q || [];
var deviceType = /iPad/.test(navigator.userAgent) ? "t" : /Mobile|iP(hone|od)|Android|BlackBerry|IEMobile|Silk/.test(navigator.userAgent) ? "m" : "d";
window.criteo_q.push( { event: "setAccount", account: 52999 }, { event: "setSiteType", type: deviceType }, { event: "setEmail", email: "" } , { event: "trackTransaction", id: orderid , item: basketproducts });
</script>
}