Sha256: 18492310ee59557f2d82b162724c99c2182e383d3b82ea5a077c3ec7747f3484

Contents?: true

Size: 644 Bytes

Versions: 2

Compression:

Stored size: 644 Bytes

Contents

<script>
  if (typeof analytics !== 'undefined') {
    analytics.track('Product List Viewed', {
      category: '<%= @taxon.try(:name) %>',
      products: [
      <% products.each_with_index do |product, index| %>
        <%= product_for_segment(product, position: index+1, image: product.images.first) %>,
      <% end %>
      ]
    });

    analytics.page('Product List Viewed', {
      category: '<%= @taxon.try(:name) %>',
      products: [
      <% products.each_with_index do |product, index| %>
        <%= product_for_segment(product, position: index+1, image: product.images.first) %>,
      <% end %>
      ]
    });

  }
</script>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_analytics_trackers-1.1.0 app/views/spree/shared/trackers/segment/_product_list_viewed.js.erb
spree_analytics_trackers-1.0.1 app/views/spree/shared/trackers/segment/_product_list_viewed.js.erb