Sha256: dbe3b56a1ddaa888d67c5ab6d93aafcfd76ffd3bcb7f90fc0e17eb4922ca3967
Contents?: true
Size: 806 Bytes
Versions: 2
Compression:
Stored size: 806 Bytes
Contents
<% if order_just_completed?(@order) %> <script> <%# more info: https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce %> if (typeof ga !== 'undefined') { ga('require', 'ec'); ga('set', '&cu', '<%= current_currency %>'); <%= render partial: 'spree/shared/google_add_items', locals: { order: @order } %> ga('ec:setAction', 'purchase', { // Transaction details are provided in an actionFieldObject. 'id': '<%= j @order.number %>', // Transaction ID. Required. 'affiliation': '<%= current_store.name %>', // Affiliation (string). 'revenue': '<%= @order.total %>', // Revenue (currency). 'tax': '<%= @order.tax_total %>', // Tax. 'shipping': '<%= @order.ship_total %>' // Shipping. }); } </script> <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_analytics_trackers-1.1.0 | app/views/spree/shared/_google_purchase.html.erb |
spree_analytics_trackers-1.0.1 | app/views/spree/shared/_google_purchase.html.erb |