google-analytics - 通用Google Analytics(分析)不起作用

标签 google-analytics

我正在跟踪eCommerce,我已经成功实现了网站的事件跟踪,但是使用电子商务却没有成功。 gaTracker是我的ga别名。

gaTracker.send('ecommerce:addTransaction', { 'id': 'OrderId', 'affliation': 'abc',
'revenue': 'GrandTotal', 'shipping': 'ShippingTotal', 'tax': 'TaxTotal' }); 
gaTracker.send('ecommerce:addItem', { 'id': 'OrderId', 'name': productName, 'sku': sku,
'category': '', 'price': price, 'quantity': quantity}); 
gaTracker.send('ecommerce:send');


我已经有ga('require', 'ecommerce', 'ecommerce.js');,并且正在使用通用分析JavaScript代码段。

我等待了24小时,然后打开了GA中的电子商务设置。

有人可以帮我这个忙吗?

gaTracker.send();这对于事件跟踪已经对我有用。

谢谢

最佳答案

在页面中加载GA之后

(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');


请遵循以下步骤:

关于google-analytics - 通用Google Analytics(分析)不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24129683/

相关文章:

seo - 将通话作为转化进行跟踪

regex - 在 Google Analytics 中匹配 25 个 IP 地址的正则表达式

python - 如何使用 Python 发布到 Google Measurement 协议(protocol)?

javascript - 当页面加载时,JavaScript 如何解析 unicode?

selenium - 如何使用 Selenium WebDriver 捕获网络流量并查找 google Analytics 调用?

asp.net - 使用 Analytics Api 显示 'Pure HTML Dashboards' 或 'Custom Components'

javascript - 运行 Google "Hello Analytics"API 教程时,如何避免出现此 X-Frame-Options SAMEORIGIN 错误?

google-analytics - Google Analytics API-您所在的国家/地区不提供此服务

android - Analytics sendEvent 不发送数据

google-analytics - 直接使用 Google Analytics Measurement Protocol API 的速率限制是多少?