Sha256: c8cfab8f20c32a1dd4bbf3fa4bcefdccbd9af5d2fb335e774ba34c238ca3772f
Contents?: true
Size: 814 Bytes
Versions: 2
Compression:
Stored size: 814 Bytes
Contents
<% if segment_enabled? && any_filtering_params? %> <script> window.addEventListener('turbolinks:load', function() { if (typeof analytics !== 'undefined') { var segmentProductListFilteredJson = { filters: [ <% filtering_params_with_values.each do |type, value| %> <%= { type: type, value: value } .to_json.html_safe %>, <% end %> ], products: [ <% @products.each_with_index do |product, index| %> <%= product_for_segment(product, position: index + 1) %>, <% end %> ] } analytics.track('Product List Filtered', segmentProductListFilteredJson); analytics.page('Product List Filtered', segmentProductListFilteredJson); } }); </script> <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems