title: Trying to use Google Analytics user timings and getting no results logged
body: <p>I am trying to use GA user timings to track the duration of ajax events in our website.  I have a centralized ajaxCall function that encapsulates the jQuery ajax call method.  This seemed like an ideal place to put the timing for the calls since almost all of our ajax calls go through this method.</p>
  
  <p>The problem that I'm having is that GA does not seem to be registering the timing hits.</p>
  
  <p>Here's the code I'm using for my ajaxCall method:</p>
  
  <pre><code>function ajaxCall(url, data, fnSuccess, dataType, fnFailure)
  {
      if (!fnFailure)
      {
          fnFailure = function(jqXhr)
          {
              var lastDitchHtml = window.getCriticalErrorDialog("An error occurred during the ajax call.");
              window.showCeebox(lastDitchHtml, 120, 350);
          };
      }
  
      var a = $('&lt;a&gt;', { href : url })[0];
  
      var startTime = getTimestampMilliseconds();
  
      $.ajax({
          cache : false,
          async : false,
          url : url,
          type : 'POST',
          dataType : dataType,
          data : data,
          success : fnSuccess,
          error : fnFailure
      });
  
      var endTime = getTimestampMilliseconds();
      var duration = endTime - startTime;
  
      window.ga('send', 'timing', 'AjaxCall', a.pathname, duration);
  }
  </code></pre>
  
  <p>Here is the code for the getTimestampMilliseconds method:</p>
  
  <pre><code>function getTimestampMilliseconds()
  {
      if (window.performance)
      {
          return window.performance.now();
      }
      else
      {
          return new Date().getTime();
      }
  }
  </code></pre>
  
  <p>I have tried the alternate syntax for the send using a javascript object for the options as follows:</p>
  
  <pre><code>window.ga('send', {
  hitType : 'timing',
  timingCategory : 'AjaxCall',
  timingVar : a.pathname,
  timingValue : duration});
  </code></pre>
  
  <p>and </p>
  
  <pre><code>window.ga('send', {
  'hitType' : 'timing',
  'timingCategory' : 'AjaxCall',
  'timingVar' : a.pathname,
  'timingValue' : duration});
  </code></pre>
  
  <p>I have verified that the beacon is getting sent to GA through the Chrome Google Analytics Debugger add-in and Fiddler.  Fiddler shows that the request to GA returns a small image and a 200 OK result.</p>
  
  <p>I have waited a full 24 hours for the results to show up and nothing.</p>
  
  <p>I have verfied that pageviews and events track just fine, just not timing requests.</p>
  
  <p>Any help would be greatly appreciated.</p>