简体   繁体   中英

Google Analytics : Ecommerce data not visible

I have setup ecommerce at GA admin for the GA-ID and use the following code on the page:

<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>

After executing, the GA debugger shows this info and states that the data is send to the GA servers.

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 

But somehow, no ecommerce data is visible in GA while pageviews are visible, anybody a clue why the data is not visible?

Regards, Marc

The code is working properly

在此处输入图片说明

Are you sure that you have the proper configuration?

在此处输入图片说明

This code belongs to Standar Ecommerce, try to check if you enhance e-commerce is not enabled.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM