Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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.

UPDATE:

var pageTracker = _gat._getTracker('UA-1234567890');
pageTracker._trackPageview();
pageTracker._addTrans('254','','217,4550','','0','İstanbul','','Turkey');
pageTracker._addItem('254','203','AAA - BBB','','169,00','1');
pageTracker._addItem('254','167','XXX - YYY','','59,90','1');
pageTracker._trackTrans(); 
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
1  
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
add comment

1 Answer 1

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._trackPageview();
pageTracker._addTrans('254','','228,90','','0','İstanbul','','Turkey');
pageTracker._addItem('254','203','AAA - BBB','','169,00','1');
pageTracker._addItem('254','167','XXX - YYY','','59,90','1');
pageTracker._trackTrans();

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

Your Answer

 
discard

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.