{% if order and google_analytics_id and ga_ecommerce_tracking %}

    <script type="text/javascript">
        var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
        document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </script>
    
    <script type="text/javascript">
        var pageTracker = _gat._getTracker("{{google_analytics_id}}");
        pageTracker._initData();
        pageTracker._trackPageview();
  
        pageTracker._addTrans(
          "{{order.id}}",
          "Zweigstelle",
          "{{order.price}}",
          "{{order.tax}}",
          "{{order.shipping_price}}",
          "{{order.invoice_city}}",
          "{{Bundesland}}",          
          "{{order.invoice_country}}"
        );
  
        {% for item in order.items.all  %}
            pageTracker._addItem(
              "{{order.id}}",
              "{{item.product_sku}}",
              "{{item.product_name}}",
              "Kategorie",
              "{{item.product_price_gross}}",
              "{{item.product_amount}}"
            );    
        {% endfor %}  
  
      pageTracker._trackTrans();
    </script>
{% endif %}