{% if order %}
<script type="text/javascript">
    var order_success = true;
    order_transaction = function(){ 
    _gaq.push(['_addTrans','{{order.id}}', '{{order.affiliation}}','{{order.subtotal}}', '{{order.tax}}', '{{order.shipping_cost|floatformat:2}}', '{{order.city}}', '{{order.state}}', '{{order.country}}' ]);
    
{% for item in order.items %}
    _gaq.push(['_addItem', '{{order.id}}', '{{ item.sku }}','{{ item.name }}', '{{ item.category }}', '{{ item.unit_price|floatformat:2 }}', '{{ item.quantity }}' ]); 
{% endfor %}

    _gaq.push(['_trackTrans']);
}
</script>
{% endif %}
