2010/8/23 Alessandro Ronchi <[email protected]> > The new code doesn't work with checkout tracking. Did anyone managed > to get new analytics code work with the async code? > Does I need a change in the checkout templates too? >
I think I solved. also receipt.html should be changed, accordingly to http://code.google.com/intl/it-IT/apis/analytics/docs/tracking/gaTrackingEcommerce.html this is the code I wrote: <script type="text/javascript"> //_gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_trackPageview']); _gaq.push(['_addTrans', "{{order.id}}", "{{Store}}", "{{order.total|truncate_decimal}}", "{{order.tax|truncate_decimal}}", "{{order.shipping_sub_total|truncate_decimal}}", "{{order.ship_city}}", "{{order.ship_state}}", "{{order.ship_country}}" ]); {% for item in order.orderitem_set.all %} _gaq.push(['_addItem', "{{order.id}}", "{{item.product.sku}}", "{{item}}", "{{item.category}}", "{{item.unit_price|truncate_decimal}}", "{{item.quantity}}" ]); {% endfor %} _gaq.push(['_trackTrans']); </script> -- Alessandro Ronchi http://www.soasi.com Hobby & Giochi http://hobbygiochi.com http://www.facebook.com/hobbygiochi -- You received this message because you are subscribed to the Google Groups "Satchmo users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/satchmo-users?hl=en.
