Google analytics 谷歌分析-缺失交易
自从我们升级到GA universal后,我们已经错过了一些交易。大约每天5-10次,占所有交易的<5% 下面是我们确认页面上的代码,它被包装在一个文档就绪函数中。在我们的review order页面中,我有一个GA事件跟踪“下订单”按钮的点击。我们正在100%跟踪这些事件。CheckOutComplete事件比我们的事务计数公平一些。 这意味着,如果我们有100个PlaceOrder点击事件显示在GA中,我将看到95个事务和96个CheckOutComplete事件 可能还有其他尚未暴露的力量在起作用。当然,在我们的开发环境中,每次都会进行大量的测试。我曾尝试将整个GA代码包装在一个带有日志记录的try-catch中,结果没有捕获任何错误 有没有其他人经历过这样的收入缺失问题?欢迎提出建议和意见Google analytics 谷歌分析-缺失交易,google-analytics,Google Analytics,自从我们升级到GA universal后,我们已经错过了一些交易。大约每天5-10次,占所有交易的
$.each(cartItems, function (key, value) {
ga('ec:addProduct', {
'id': this.StyleNumber.toUpperCase(), // Product ID
'name': this.StyleNumber.toUpperCase(), // Product name. Required.
'sku': this.SkuNumber, // SKU/code.
'brand': this.Brand, // Category or variation.
'price': this.Price, // Unit price.
'quantity': this.Qty // Quantity.
});
});
ga('ec:setAction', 'purchase', { // Transaction details are provided in an actionFieldObject.
'id': invoiceNumber, // (Required) Transaction id (string).
'affiliation': 'COS', // Affiliation (string).
'revenue': amount, // Revenue (currency).
'tax': taxAmount, // Tax (currency).
'shipping': shipAmount, // Shipping (currency).
'coupon': coupon // Transaction coupon (string).
});
ga('send', 'event', 'Checkout', 'Checkoutcomplete');
事实证明,这是GA中的一个限制。每次调用只能发送大约80KB。因为这个网站是一个B2B,有非常大的推车
变量类型是否总是正确的?如果其中一个不正确,事务将不会在另一个版本中发送,我执行了检查以确保没有任何内容为null或空字符串。我也没那么幸运。我没有检查类型,所以我可以这样做。例如,如果你发送一个字符串而不是数字,它也不会被发送。检查类型,可能会有所帮助