Google Product Forums

Wrong eCommerce tracking being picked up

follena Jul 4, 2012 8:09 AM
Posted in group: Google Analytics

Categories: Asynchronous Tracking Code Snippet :

Hello everyone,

I have an issue with my eCommerce tracking. We have a third party donation page which is hooked up to our GA account. This page has some hard code in it which is populating our eCommerce section with the payment and the product name but no other information. I added in the eCommerce tracking I would like to use to the page but it isn't being picked up. 
Is it possible to add in some additional coding which will pick up my eCommerce tracking and not the coding they have added in to track their own transactions across several charities?  I have attached the codes of our tracking and theirs. 

Any help would be greatly appreciated it is driving me crazy.  

Thank you.

This is their code
<style type="text/css">
.nofouc {display: none;}
</style>
type="text/javascript"> fu
<scrip
tnction e2_ga(gaAccount) { //
// _gaq = []; //
if (typeof _gaq == "undefined"
) _gaq.push(['_setAccount', gaAccount]);
ne']); _gaq.push(['_setAllowLinker', t
_gaq.push(['_setDomainName', 'n
orue]); _gaq.push(['_trackPageview']); //
_gaq.push(['_addTrans
var total = 3.00 + 0; if (total > 0) {
', '1238176', // '', //
'', '', '']); // if
total.toString(), // '', '',
(3.00 != 0) { _gaq.push(['_addItem', '1238176', //
'', // '3.0
'Donation', // 'Donation', //
0', // '1' // ]); } if (0 != 0) {
ee', // 'Registration
_gaq.push(['_addItem', '1238176', // 'Registration
F Fee', // '', // '0', // '1' // ]); }
_gaq.push(['_trackTrans']); } }
</script>

And my code

<script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-xxxxxxx-1']); _gaq.push(['_trackPageview']); _gaq.push(['_addTrans', 'em...@domain.org.uk', // order ID - required 'Online Donation', // affiliation or store name '£3.00', // total - required '''', // tax '''', // shipping 'Leatherhead', // city '''', // state or province 'UNITED KINGDOM' // country ]); // add item might be called for every item in the shopping cart // where your ecommerce engine loops through each item in the cart and // prints out _addItem for each _gaq.push(['_addItem', 'em...@domain.org.uk', // order ID - required '1', // SKU/code - required 'Donation', // product name 'Online', // category or variation '£3.00', // unit price - required '1' // quantity - required ]); _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers (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); })(); </script>