Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got 9 successful transaction but I can see only 2 in google analytics. I do redirect to https while I get payment that I doubt about it may cause but not really sure while e-commerce tracking doesn't work properly.


var pageTracker = _gat._getTracker('UA-1234567890');
pageTracker._addItem('254','203','AAA - BBB','','169,00','1');
pageTracker._addItem('254','167','XXX - YYY','','59,90','1');
share|improve this question
Have you put the proper GA tracking code for all the actions on your site? – Prasad Feb 25 '13 at 4:11
what do you mean all the actions? only one action has that's the completed order. also I have GA tracking code for all pages, Its in the master page. – Mert Feb 25 '13 at 7:23
Are you sure your e-commerce tracking code (separate code that goes only on the checkout-success page) is firing for every completed transaction? Or is it only firing on certain conditions that may not be met for every transaction? I also believe your order IDs will need to be unique each time. From your question, it would seem that the tracking code is working, it's just not working all the time. Also note that it does take some time for the data to show up in Google Analytics. – nathangiesbrecht Feb 26 '13 at 18:03
I just added sample e-commerce tracking code on checkout-success, yes the problem seems not working all time. and yes I do add tracking code in all conditions. probably I won't see this sample trans in google anlytics.. – Mert Feb 26 '13 at 19:20
We are using a A URL to track the sales? The simplest way is to add Goal URL, The URL which appears after completion of sale process. You can try that as well. – user2434 Oct 3 '13 at 10:07
up vote 2 down vote accepted

The example you gave is incorrect and you need to check your implementation, since your addTrans and addItems do not match up.

This is how it should look like:

var pageTracker = _gat._getTracker('UA-1234567890');
pageTracker._addItem('254','203','AAA - BBB','','169,00','1');
pageTracker._addItem('254','167','XXX - YYY','','59,90','1');

So what's different? Your addTrans needs to be populated with the TOTAL price of all addItems. You have 169,00 + 59,90, each with a quantity of 1. That translates to 228,90 and not 217,4550 in your example. Since the total sum breaks, no transaction is recorded.

share|improve this answer
The diffrence caused by %5 cash discount. what should I do in discount cases – Mert Oct 3 '13 at 10:26
Found this question again due to the upvote. Although this question is already ages old, you need to substract the 5% discount from the items (addItem) which have the discounts, thus the final amount (addTrans) is correct. – uberconversion Feb 6 '15 at 8:52

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.