Sha256: d3b21eed224179863154d33e4a0103221403d4caa21a7ce492827c1319f8134b
Contents?: true
Size: 1.32 KB
Versions: 8
Compression:
Stored size: 1.32 KB
Contents
<% if tracker = Tracker.current %> <%= javascript_tag do -%> 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")); <% end -%> <%= javascript_tag do -%> var pageTracker = _gat._getTracker("<%= tracker.analytics_id %>"); pageTracker._initData(); pageTracker._trackPageview(); <% 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
8 entries across 8 versions & 1 rubygems