title: Ajax google analytics event tracking in html page not working
body: <p>Following is the Google Analytics code added just before close of /head in html page.</p>
  
  <pre><code>var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-xxxxxxxx-x']);
  _gaq.push(['_trackPageview']);
  
  (function() {
      var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
      ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
  </code></pre>
  
  <p>Following is where I am calling the event... when successful or failed... </p>
  
  <pre><code>$.ajax({
      url: "/xxx/xx/",
      type: "POST",
      data: { name: q, seme: o, profile: x }
      datatype: "html",
      success: function (f) {
          _gaq &amp;&amp; _gaq.push(["_trackEvent", "contactform", "success", i, p])
  },
      error: function (f) {
          _gaq &amp;&amp; _gaq.push(["_trackEvent", "contactform", "crash", i, p])
      }
  });
  </code></pre>
  
  <p>But the event is not recorded... I have been waiting to see something from past 4 days.. I have performed few tests but it is not showing up in the analytics... Am I doing anything wrong? Do I have to add any extra line in Google Analytics main snippet added in head tag?</p>
  
  <p>GA tracks the normal data but not these event.</p>