I’d like to record transactions in Analytic’s Ecommerce module. They’re not registering however and I don’t know why. Page tracking happens at the top of the page:
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-22238012-1']);
_gaq.push(['_trackPageview']);
and just prior to Ecommerce code, I’m tracking an event.
_gaq.push(['_trackEvent', 'Conference', 'Signup', '1']);
Both an event and page tracking appear in Analytics, however this bit doesn’t.
_gaq.push(['_addTrans',
"26", // transaction ID - required
"", //store name
"5160", // total - required
"0", //tax
"0.0", //shipping
"", //city
"", //state
"DK" // country
]);
_gaq.push(['_addItem',
"26", // transaction ID - necessary to associate item with transaction
"1", // SKU/code - required
"Paid Attendant", // product name
"", //category
"3195", // unit price - required
"1" // quantity - required
]);
_gaq.push(['_addItem',
"26", // transaction ID - necessary to associate item with transaction
"3", // SKU/code - required
"Extra Material", // product name
"", //category
"1965.00", // unit price - required
"1" // quantity - required
]);
_gaq.push(['_trackTrans']); //submits transaction to the Analytics servers
Do you have any idea as to why not?
Thanks, Michal
This is now solved. It took nearly more than a day for my transaction to appear, but it’s there now.
The recorded transaction ids are exactly the ones that I tried yesterday. So the above example actually works.