Sha256: be53a5b3c3b5dc53ebddddf70ae2e9480e278d2d3266526227306406720cb798
Contents?: true
Size: 679 Bytes
Versions: 9
Compression:
Stored size: 679 Bytes
Contents
<% order.line_items.each do |line_item| %> ga('ec:addProduct', { // Provide product details in a productFieldObject. 'id': '<%= j (line_item.sku.present? ? line_item.sku : line_item.variant_id.to_s) %>', // Product ID (string). 'name': '<%= j line_item.name %>', // Product name (string). 'category': '<%= j line_item.category.try(:name) %>', // Product category (string). 'brand': '<%= j line_item.brand.try(:name) %>', // Product brand (string). 'variant': '<%= j line_item.options_text %>', // Product variant (string). 'price': '<%= line_item.price %>', 'quantity': <%= line_item.quantity %> }); <% end %>
Version data entries
9 entries across 9 versions & 1 rubygems