title: AJAX form submission and Google Analytics
body: <p>I am trying to track an AJAX form submission in Google Analytics. I have tried using the following code to create a page view in GA to track goals, however the page view is not tracking.</p>
  
  <pre><code>&lt;script type="text/JavaScript"&gt;
  
  $("#template-contactform").validate({
      submitHandler: function(form) {
          $('.form-process').fadeIn();
          $(form).ajaxSubmit({
              target: '#contact-form-result',
              success: function() {
                  $('.form-process').fadeOut();
                  $('#template-contactform').find('.sm-form-control').val('');
                  $('#contact-form-result').attr('data-notify-msg', $('#contact-form-result').html()).html('');
                  SEMICOLON.widget.notifications($('#contact-form-result'));
                  ga('send', {
                      'hitType' : 'pageview',
                      'page' : '/contact-us-success' // Virtual page (aka, does not actually exist) that you can now track in GA Goals as a destination page.
                  });
              }
          });
      }
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>UPDATE:</p>
  
  <p>I have resolved this by using Event Tracking. I used the code below in the submit button and created a new goal tracking the event in GA.</p>
  
  <pre><code>onClick="ga('send', 'event', { eventCategory: 'Contact', eventAction: 'ContactRequest'});
  </code></pre>