Sha256: eb2f61e1e0b51ae978debcb7f72e6915b07ffd8d1f7e4539a01399acff1a3b77
Contents?: true
Size: 1.38 KB
Versions: 6
Compression:
Stored size: 1.38 KB
Contents
<% if tracker = Spree::Tracker.current %> <%= javascript_tag do -%> var _gaq = _gaq || []; _gaq.push(['_setAccount', '<%= tracker.analytics_id -%>']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); <% end -%> <% if flash[:commerce_tracking] %> <%= javascript_tag do -%> // report e-commerce transaction information when applicable pageTracker._addTrans( "<%= @order.number %>", //Order Number "", //Affiliation "<%= @order.total %>", //Order total "<%= @order.adjustments.tax.sum(:amount).to_s %>", //Tax Amount "<%= @order.adjustments.shipping.sum(:amount).to_s %>", //Ship Amount "", //City "", //State "" //Country ); <% @order.line_items.each do |line_item| %> pageTracker._addItem("<%= @order.number %>", "<%= line_item.variant.sku %>", "<%= line_item.variant.product.name %>", "" /*Product Category*/, "<%= line_item.price %>", "<%= line_item.quantity %>"); <% end %> pageTracker._trackTrans(); <% end -%> <% end %> <% end %>
Version data entries
6 entries across 6 versions & 1 rubygems