Confirmation de commande

<% console.log(cart) %>
var dakisId = '<%= cart.id %>'; var dakisSubTotal = '<%= cart.subTotal %>'; var dakisTaxes = '<%= cart.taxes.totalTaxes %>'; var dakisTotal = '<%= cart.taxes.total %>'; var dakisShipping = '<%= cart.taxes.totalShipping %>'; var dakisCurrency = '<%= cart.currency.code %>'; ga('require', 'ecommerce'); ga('ecommerce:addTransaction', { 'id': dakisId, 'revenue': dakisSubTotal, 'shipping': dakisShipping, 'tax': dakisTaxes }); <% for (var i = 0; i < cart.items.length; i++ ) { ga('ecommerce:addItem', { 'id': cart.items[i].id, 'name': cart.items[i].text, 'price': cart.items[i].price, 'quantity': cart.items[i].quantity }); } %> ga('ecommerce:send');