AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Analytics
2.3K members online now
2.3K members online now
Learn how to set up goals and Ecommerce tracking, verify accuracy of attribution traffic sources, and discuss funnel visualization, Multi-Channel Funnels, the Goal Flow Report, and Enhanced Ecommerce
 
Guide Me
star_border
Reply

Analytics is not tracking ecommerce, no ecommerce data

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

hi,

   my ecommerce tracking code has been added a few days ago, but my google  analytics account no data, but in page resouce output data, what's wrong?

   my code:

 

<%if(action=="succeed")%>
<%if(orderModel!=null && orderModel.order_type==1)%>

<script type="text/javascript">
ga('require', 'ecommerce');

ga('ecommerce:addTransaction', {
'id': '{orderModel.order_no}', // Transaction ID. Required.
'affiliation': '行云全球汇', // Affiliation or store name.
'revenue': '{orderModel.order_amount}', // Grand Total.
'shipping': '5', // Shipping.
'tax': '0' // Tax.
});

<%foreach(XingYun.Model.order_goods og in orderModel.order_goods)%>
ga('ecommerce:addItem', {
'id': '{orderModel.order_no}',
'name': '{og.goods_title}',
'sku': '{og.goods_no}',
'category': '{og.article_id}',
'price': '{og.real_price}',
'quantity': '{og.quantity}',
'currency': 'RMB' // local currency code.
});
<%/foreach%>
ga('myTracker.ecommerce:send');
</script>

and my google analytics output nothing:

1.JPG

Re: Analytics is not tracking ecommerce, no ecommerce data

A T
Participant ✭ ✭ ✭
# 2
A T
Participant ✭ ✭ ✭
Hi,

You can easily debug on the website with GA debugger:
https://chrome.google.com/webstore/detail/jnkmfdileelhofjcijamephohjechhna

You can check in chrome, console tab with 'Preserve log' turned ON.

Best Regards,
GA Guru.

'Star' or 'Accept as Solution' if it helped.