Thread Starter
Bloke
(@bloke)
Changed to 2010 theme and tested. It will display tax amount and grand total on screen but tax not being sent by GA script.
_gaq.push([‘_addTrans’,
’41’, // order ID – required
‘mysite’, // affiliation or store name
‘2.50’, // total – required
‘0.00’, // tax
‘10.00’, // shipping
‘NYC’, // city
”, // state or province
’22’ // country
]);
_gaq.push(['_addItem','41','ABC123','Goldfish','Tropical Fish','2.50','1']);
_gaq.push(['_trackTrans']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
Thread Starter
Bloke
(@bloke)
The code is pulling tax record (tax_charged) from wpsc_cart_contents which is always zero because I am not charging per item. If I look in the wpsc_purchase_logs that is where the total tax is stored.
Thread Starter
Bloke
(@bloke)
Created a new function in the Google analytics class to retrieve the total tax from the purchase log instead of cart_contents table.
Thanks Bloke! Would you be willing to open an issue or pull request on Github so we can track this issue and implement a fix for it?
https://github.com/wp-e-commerce/WP-e-Commerce/issues/new
Thread Starter
Bloke
(@bloke)
Yes I will. I just signed up. I have never used Github before. I will also send some other requests for fixes.