首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >谷歌分析:电子商务数据不可见

谷歌分析:电子商务数据不可见
EN

Stack Overflow用户
提问于 2018-02-19 01:30:25
回答 1查看 398关注 0票数 0

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

代码语言:javascript
复制
<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服务器。

代码语言:javascript
复制
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中是不可见的,而页面浏览量是可见的,有人知道为什么数据不可见吗?

问候你,马克

EN

回答 1

Stack Overflow用户

发布于 2018-02-22 19:27:41

代码运行正常

您确定您有正确的配置吗?

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

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/48854572

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档