我必须将电子商务的跟踪代码包含到现有代码中。我知道我应该使用这些方法_addItem
,,,_addTrans
。_trackTrans
我可以使用这个代码:
`
_gaq.push(['_setAccount', 'UA-XXXXX-X']);
_gaq.push(['_trackPageview']);
_gaq.push(['_addItem',
'1234',
'DD44', // SKU/code - required
'T-Shirt', // product name
'Olive Medium', // category or variation
'11.99', // unit price - required
'1' // quantity - required
]);
_gaq.push(['_addTrans',
'1234', // transaction ID - required
'Womens Apparel', // affiliation or store name
'28.28', // total - required
'1.29', // tax
'15.00', // shipping
'San Jose', // city
'California', // state or province
'USA' // country
]);
_gaq.push(['_trackTrans']);
`
_addTrans
或者之前必须使用_addItem
谢谢