title: Google Analytics Event Tracking - Minimal Interval between the events
body: <p>I want to track multiple events using GA <code>_trackEvent</code> method across multiple domains.</p>
  
  <p>Because of the nature of the report I want to generate, I must do something like this:</p>
  
  <pre><code>for (var i=0; var &lt; books.length; i++)
  {
     //showing values for current books[i]
     _gaq.push(['_trackEvent', 'Books Displayed', 'Fantasy', 'Lord of The Rings']);
  }
  </code></pre>
  
  <p>So, when my books list is populated I want to send appropriate GA event. It is important that I send each item separately so I can drill-down on Event Dashboard to preview all items in 'Fantasy' category and so on.</p>
  
  <p>Note, books list is never longer than about 10 items.</p>
  
  <p>The problem I'm experiencing at the moment is that for no good reason Google code is ignoring some of my requests. The way how Google event tracking works, is that with every call to <code>_trackEvent</code>, Google is dropping gif on the page:</p>
  
  <pre><code>http://www.google-analytics.com/__utm.gif
  </code></pre>
  
  <p>that has loads of parameters, and one of them - <code>utme</code> contains my data:</p>
  
  <pre><code>__utm.gif?utmt=event&amp;utme=5(Books%20Displayed*Fantasy*Lord%20of%20The%20Rings)
  </code></pre>
  
  <p>Using Fiddler (or Firebug Net tab) I can check if this request is really coming out from the browser.</p>
  
  <p>Unfortunately, it seems like every time about half of my requests are completely <strong>ignored</strong> by google and <code>_trackEvent</code> is not translated to <code>__utm.gif</code> call.</p>
  
  <p>I have a feeling it has something to do with the frequency of the <code>_trackEvent</code> call. Because I am using them inside a for loop, all events are spawned with minimal interval between. It seems like Google doesn't like it, and ignores my calls.</p>
  
  <p>I did test it, adding 2 seconds interval between each call and it worked. But this solution is unacceptable - I can't make user wait for 20 seconds to send all events.</p>
  
  <p>Unfortunately this flaw makes GA Event Tracking completely useless - I can't just "hope" GA code will correctly record my event because the report won't be precise. The worst thing about it is that there is no proper documentation on Google saying what is the maximum allowed number of requests per second (they only <a href="http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html#implementationConsiderations" rel="nofollow">state</a> that max request per session is 500 what is a lot more than what I generate anyway).</p>
  
  <p>My question is - did you experience similar problems with Google Event tracking before and how did you manage to fix it? Or does it mean I must completely abandon GA Tracking because it will never be precise enough? </p>