title: How to automate test google analytics on every event fired using Selenium WebDriver
body: <p>I am working on Google Analytics automation test with Selenium WebDriver java bindings. Our site has Google Analytics tracking events set on important elements on the site. I need to verify that on clicking a certain element under test, the Google Analytic event is in fact fired.</p>
  
  <p>I'm testing it on FireFox. When I click F12, I can see in the console that a Google Analytics is fired with message <code>GET http://www.google-analytics.com/__utm.gif</code> on each element click event.</p>
  
  <pre><code>    SampleCode :-
        WebDriver wd = new FirefoxDriver();
        wd.get("http://www.dummyExample.com/");
        wd.findElement(By.linkText("Document Referece")).click();
        wd.findElement(By.id("Ex2vc2")).click();
  </code></pre>
  
  <p>How can I achieve this task? I have googled it but could not find good answers. If anyone can help me with some references or sample code I would be very Thankful.</p>