analytics.js
function enhancedEcommerceTrackProduct(track) {
  var props = track.properties();

  window.ga('ec:addProduct', {
    id: track.id() || track.sku(),
    name: track.name(),
    category: track.category(),
    quantity: track.quantity(),
    price: track.price(),
    brand: props.brand,
    variant: props.variant,
    currency: track.currency()
  });
}
function enhancedEcommerceTrackProduct(track) {
  var props = track.properties();

  window.ga('ec:addProduct', {
    id: track.id() || track.sku(),
    name: track.name(),
    category: track.category(),
    quantity: track.quantity(),
    price: track.price(),
    brand: props.brand,
    variant: props.variant,
    currency: track.currency()
  });
}
function enhancedEcommerceTrackProduct ( track ) { var props = track . properties ( ) ; window . ga ( 'ec:addProduct' , { id : track . id ( ) || track . sku ( ) , name : track . name ( ) , category : track . category ( ) , quantity : track . quantity ( ) , price : track . price ( ) , brand : props . brand , variant : props . variant , currency : track . currency ( ) } ) ; }
Enhanced ecommerce track product.

Simple helper so that we don't repeat `ec:addProduct` everywhere.

@api private
@param {Track} track
Enhanced ecommerce track product .