title: Google Analytics ecommerce sends only last item in transaction
body: <p>I'm using Google Analytics to track page views and transactions. The problem is that the ecommerce tracking only sends the last item added.</p>
  
  <p>Here's the code that I'm using:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
      (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
      m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
      })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
  
      ga('create', 'UA-XXXXXXXX-1'); // fake code here
      ga('send', 'pageview');
  
      ga('require', 'ecommerce', 'ecommerce.js');
  
      ga('ecommerce:addTransaction', {
          'id': '31887',
          'revenue': '152.80',
          'shipping': '15.00',
          'currency': 'RON'
      });
  
      ga('ecommerce:addItem', {
          'id': '31887',
          'name': 'Product 1 ',
          'price': '94.90',
          'quantity': '1'
      });
  
      ga('ecommerce:addItem', {
        'id': '31887',
        'name': 'Product 2 ',
        'price': '57.90',
        'quantity': '1'
      });
  
      ga('ecommerce:send');
  &lt;/script&gt;
  </code></pre>
  
  <p>The code above should send 2 items but it only sends <code>Product 2</code>. Below are the requests that get sent:</p>
  
  <p><img src="https://i.stack.imgur.com/ip5wp.jpg" alt="enter image description here"></p>
  
  <p>As expected only the last item is being shown in the Google Analytics panel. The code seems right in every respect according to the <a href="https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce" rel="noreferrer">Ecommerce Tracking Docs</a>.</p>
  
  <p>Any help on this would be greatly appreciated.</p>