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
4.8K members online now
4.8K 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

Ecommerce Tracking Quantities incorrect

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭
We've been having some issues with the reporting of our eCommerce tracking. Essentially when adding items to basket each item of the same kind is added into the basket on another line (this is unfortunately something we are unable to change due to the personalised nature of our products). the main issue occurs when we are tracking product revenue and quantities. As it seems that when the same line is added as per below: ga('ecommerce:addItem', {
'id': 'xxxx',
'name': 'Widgets',
'sku': 'a123',
'category': 'stuff',
'price': '10.99',
'quantity': '1'
});
ga('ecommerce:addItem', {
'id': 'xxxx',
'name': 'Widgets',
'sku': 'a123',
'category': 'stuff',
'price': '10.99',
'quantity': '1'
});
ga('ecommerce:send');
</script>

only a quantity of 1 is reported and only a product revenue of 10.99 is reported (transactional revenue is absolutely fine).
I have been in contact with google support, whom have suggested to remove the following aspects in red:





<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-xxxxxxx-x'); ga('require', 'displayfeatures'); ga('send', 'pageview'); ga('set', 'dimension1', 'xxxx'); ga('require', 'ecommerce', 'ecommerce.js'); ga('ecommerce:addTransaction', { 'id': 'xxxx', 'affiliation': 'xxxx', 'revenue': '12', 'shipping': '0.00', 'tax': '2', 'currency': 'GBP'}); ga('ecommerce:addItem', { 'id': 'xxxx', 'name': 'widget', 'sku': 'a123', 'category': 'xxx', 'price': '10.99', 'quantity': '1' });

essentially i am not convinced that the "amends" above (in red text) will solve the problem, can anyone else be of assistance?

2 Expert replyverified_user
1 ACCEPTED SOLUTION

Accepted Solutions
Marked as Best Answer.
Solution
Accepted by topic author Paul S
March

Re: Ecommerce Tracking Quantities incorrect

Top Contributor
# 3
Top Contributor
Hi Paul,

The problem is that you're sending the item with the same sku multiple times so the last one overwrites the previous ones. You can resolve this only by sending the details for each item in one addItem block.

Hope this helps.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital

View solution in original post

Re: Ecommerce Tracking Quantities incorrect

Top Contributor
# 2
Top Contributor

Hi Paul,

 

  • Accept the first red issue and write ga('require', 'ecommerce'); instead
  • Leave currency directive like it is - it's correct
  • If your products are personalized try to add any personalized identifer to 'name" and/or 'sku' in order to make them unique
  • Check that you didn't activate "enhanced e-commerce tracking" in your Analytics view settings

Christoph

 

 

Marked as Best Answer.
Solution
Accepted by topic author Paul S
March

Re: Ecommerce Tracking Quantities incorrect

Top Contributor
# 3
Top Contributor
Hi Paul,

The problem is that you're sending the item with the same sku multiple times so the last one overwrites the previous ones. You can resolve this only by sending the details for each item in one addItem block.

Hope this helps.

Arnold Majlath, Google Analytics Top Contributor
Was my response helpful? If yes, please accept it as solution.
Circle Me On Google+ | Visit me @ Redfly Digital