Sha256: 11820b5b6646a536b0cd9e0250a5ba4e0154809302c5c60e38f6b8e64fc1a7c9

Contents?: true

Size: 1.33 KB

Versions: 29

Compression:

Stored size: 1.33 KB

Contents

<% if tracker = Tracker.current %>

  <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("<%= tracker.analytics_id %>");
    pageTracker._initData();
    pageTracker._trackPageview();
  </script>

  <% if flash[:commerce_tracking] %>

    <script type="text/javascript">
      // 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();
    </script>

  <% end %>

<% end %>



Version data entries

29 entries across 29 versions & 6 rubygems

Version Path
apispree_core-0.0.0 app/views/shared/_google_analytics.html.erb
My-Commerce_core-1.1.0 app/views/shared/_google_analytics.html.erb
My-Commerce_core-1.0.0 app/views/shared/_google_analytics.html.erb
MyCommerceapi-1.0.0 core/app/views/shared/_google_analytics.html.erb
MyCommerce-0.0.3 core/app/views/shared/_google_analytics.html.erb
rfcommerce_core-0.0.3 app/views/shared/_google_analytics.html.erb
spree_core-0.60.6 app/views/shared/_google_analytics.html.erb
spree_core-0.60.5 app/views/shared/_google_analytics.html.erb
spree_core-0.30.2 app/views/shared/_google_analytics.html.erb
spree_core-0.40.4 app/views/shared/_google_analytics.html.erb
spree_core-0.50.4 app/views/shared/_google_analytics.html.erb
spree_core-0.60.4 app/views/shared/_google_analytics.html.erb
spree_core-0.50.3 app/views/shared/_google_analytics.html.erb
spree_core-0.60.3 app/views/shared/_google_analytics.html.erb
spree_core-0.60.2 app/views/shared/_google_analytics.html.erb
spree_core-0.70.0.rc2 app/views/shared/_google_analytics.html.erb
spree_core-0.70.RC1 app/views/shared/_google_analytics.html.erb
spree_core-0.60.1 app/views/shared/_google_analytics.html.erb
spree_core-0.60.0 app/views/shared/_google_analytics.html.erb
spree_core-0.60.0.RC1 app/views/shared/_google_analytics.html.erb