Google Analytics:电子商务数据不可见

时间:2018-02-18 17:30:25

标签: google-analytics

我已在GA管理员处为GA-ID设置电子商务,并在页面上使用以下代码:

<script>
(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');
ga('create', 'UA-23554312-1', 'auto');
ga('require', 'displayfeatures');
ga('require', 'ecommerce');
ga('ecommerce:addTransaction', {
'id': '364',
'affiliation': 'Besteld winkel Barendrecht',
'revenue': '14.75',
'shipping': '0',
'tax': '0.83',
'currency': 'EUR'
});
ga('ecommerce:send'); 
ga('send', 'pageview');
</script>

执行后,GA调试器会显示此信息,并说明数据已发送到GA服务器。

analytics_debug.js:10 
                         _                          _       _   _
                        | |                        | |     | | (_)
  __ _  ___   ___   __ _| | ___    __ _ _ __   __ _| |_   _| |_ _  ___ ___
 / _` |/ _ \ / _ \ / _` | |/ _ \  / _` | '_ \ / _` | | | | | __| |/ __/ __|
| (_| | (_) | (_) | (_| | |  __/ | (_| | | | | (_| | | |_| | |_| | (__\__ \
 \__, |\___/ \___/ \__, |_|\___|  \__,_|_| |_|\__,_|_|\__, |\__|_|\___|___/
  __/ |             __/ |                              __/ |
 |___/             |___/                              |___/

analytics_debug.js:10 Running analytics_debug.js. This script is intended for testing and debugging only.
log @ analytics_debug.js:10
J @ analytics_debug.js:9
(anonymous) @ analytics_debug.js:88
(anonymous) @ analytics_debug.js:88
analytics_debug.js:10 Initializing Google Analytics.
analytics_debug.js:10 Loading resource for plugin: ecommerce
analytics_debug.js:10 Loading script: "http://www.google-analytics.com/plugins/ua/ecommerce.js"
analytics_debug.js:10 Running command: ga("create", "UA-23554312-1", "auto")
analytics_debug.js:10 Creating new tracker: t0
analytics_debug.js:10 Auto cookieDomain found: "none"
analytics_debug.js:10 Running command: ga("require", "displayfeatures")
analytics_debug.js:10 Set called on unknown field: "dcLoaded".
analytics_debug.js:10 Plugin "displayfeatures" intialized on tracker "t0".
analytics_debug.js:10 Running command: ga("require", "ecommerce")
analytics_debug.js:10 Waiting on require of "ecommerce" to be fulfilled.
analytics_debug.js:10 Registered new plugin: ga(provide, "render", Function)
analytics_debug.js:10 Running command: ga("require", "ecommerce")
analytics_debug.js:10 Waiting on require of "ecommerce" to be fulfilled.
analytics_debug.js:10 Executing Google Analytics commands.
analytics_debug.js:10 Registered new plugin: ga(provide, "ecommerce", Function)
analytics_debug.js:10 Running command: ga("require", "ecommerce")
analytics_debug.js:10 Plugin "ecommerce" intialized on tracker "t0".
analytics_debug.js:10 Running command: ga("ecommerce:addTransaction", {id: "364", affiliation: "Besteld winkel Barendrecht", revenue: "14.75", shipping: "0", tax: "0.83", currency: "EUR"})
analytics_debug.js:10 Running command: ga("ecommerce:send")
analytics_debug.js:10 Setting throttling cookie: "_gat"
analytics_debug.js:10 
Sent beacon:
v=1&_v=j66d&a=174828128&t=transaction&cu=EUR&_s=1&dl=http%3A%2F%2Flocalhost%2FCheckoutOrderComplete.aspx&ul=nl&de=UTF-8&dt=Bestelling%20afgerond-%20EXTRAvestiging%20-%20Demo&sd=24-bit&sr=1920x1080&vp=1903x555&je=0&fl=28.0%20r0&_utma=111872281.1236863535.1507862225.1513797396.1518145147.22&_utmz=111872281.1507862225.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)&_utmht=1518974473010&_u=CCCCgEIR~&jid=730626661&gjid=1177340694&cid=1236863535.1507862225&tid=UA-23554312-1&_gid=646397752.1518971240&ti=364&ta=Besteld%20winkel%20Barendrecht&tr=14.75&ts=0&tt=0.83&z=6087463


analytics_debug.js:10 _j1              (&jid)  730626661
analytics_debug.js:10 _j2              (&gjid) 1177340694
analytics_debug.js:10 adSenseId        (&a)    174828128
analytics_debug.js:10 apiVersion       (&v)    1
analytics_debug.js:10 clientId         (&cid)  1236863535.1507862225
analytics_debug.js:10 currencyCode     (&cu)   EUR
analytics_debug.js:10 ec:affiliation   (&ta)   Besteld winkel Barendrecht
analytics_debug.js:10 ec:id            (&ti)   364
analytics_debug.js:10 ec:revenue       (&tr)   14.75
analytics_debug.js:10 ec:shipping      (&ts)   0
analytics_debug.js:10 ec:tax           (&tt)   0.83
analytics_debug.js:10 encoding         (&de)   UTF-8
analytics_debug.js:10 flashVersion     (&fl)   28.0 r0
analytics_debug.js:10 hitType          (&t)    transaction
analytics_debug.js:10 javaEnabled      (&je)   0
analytics_debug.js:10 language         (&ul)   nl
analytics_debug.js:10 location         (&dl)   http://localhost/CheckoutOrderComplete.aspx
analytics_debug.js:10 screenColors     (&sd)   24-bit
analytics_debug.js:10 screenResolution (&sr)   1920x1080
analytics_debug.js:10 title            (&dt)   Bestelling afgerond- EXTRAvestiging - Demo
analytics_debug.js:10 trackingId       (&tid)  UA-23554312-1
analytics_debug.js:10 viewportSize     (&vp)   1903x555
analytics_debug.js:10 

但不知何故,GA中没有电子商务数据可见,而浏览量可见,任何人都知道数据不可见的原因?

问候,Marc

1 个答案:

答案 0 :(得分:0)

代码正常运行

enter image description here

您确定自己配置正确吗?

enter image description here

此代码属于Standar电子商务,尝试检查您是否未启用增强电子商务。