title: Tracking catalog product impressions - Enhanced Ecommerce Google Analytics
body: <p>I'm trying to implement product impressions on a ecommerce catalog page using <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/enhanced-ecommerce" rel="noreferrer">google analytics enhanced ecommerce</a> tracking.</p>
  
  <p>Following the specs one should implement it like this:</p>
  
  <pre><code>ga('create', 'UA-XXXXX-Y');
  ga('require', 'ec');
  
  ga('ec:addImpression', {
    'id': 'P12345',                   // Product details are provided in an impressionFieldObject.
    'name': 'Android Warhol T-Shirt',
    'category': 'Apparel/T-Shirts',
    'brand': 'Google',
    'variant': 'black',
    'list': 'Search Results',
    'position': 1                     // 'position' indicates the product position in the list.
  });
  
  ga('ec:addImpression', {
    'id': 'P67890',
    'name': 'YouTube Organic T-Shirt',
    'type': 'view',
    'category': 'Apparel/T-Shirts',
    'brand': , 'YouTube',
    'variant': 'gray',
    'list': 'Search Results',
    'position': 2
  });
  
  ga('send', 'pageview');              // Send product impressions with initial pageview.
  </code></pre>
  
  <p>Although the specs show a track pageview event. In order to send REAL impressions I wanted to trigger the beacon once the user scrolled down. To do that I've triggered the event through a "lazy loader" which loads gradually the images on the catalog using the event 'ga(send, impression)' but it won't work and if I do that with additional pageviews events I would be corrupting my pageviews metric on GA.</p>
  
  <p>Does anyone have ideas on how to solve that?</p>