title: Google AdWords Conversion on AJAX Form?
body: <p>We have been asked by a client to add their AdWord Conversion tracking code to a landing page following the completion of an enquiry form, the problem is the form is AJAX based so there is no “landing page”.</p>
  
  <p>We have read many posts and followed the guidance to use the <strong>Asynchronous AdWords Remarketing Tag</strong></p>
  
  <p><a href="https://developers.google.com/adwords-remarketing-tag/asynchronous/" rel="nofollow noreferrer">https://developers.google.com/adwords-remarketing-tag/asynchronous/</a></p>
  
  <p><strong>Therefore amending from this code:</strong></p>
  
  <pre><code>&lt;!-- Google Code for Footer Contact Form Conversion Page --&gt;
  &lt;script type="text/javascript"&gt;
  /* &lt;![CDATA[ */
    var google_conversion_id = XXXXXXXXX;
    var google_conversion_language = "en";
    var google_conversion_format = "3";
    var google_conversion_color = "ffffff";
    var google_conversion_label = "XXXXXXXXXXXXXXXXXX";
    var google_remarketing_only = false;
  /* ]]&gt; */
  &lt;/script&gt;
  &lt;script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"&gt;
  &lt;/script&gt;
  &lt;noscript&gt;
  &lt;div style="display:inline;"&gt;
  &lt;img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/XXXXXXXXX/?label=XXXXXXXXXXXXXXXXXX&amp;amp;guid=ON&amp;amp;script=0"/&gt;
  &lt;/div&gt;
  &lt;/noscript&gt;
  </code></pre>
  
  <p><strong>To:</strong></p>
  
  <p><em>In head:</em></p>
  
  <pre><code>&lt;script type="text/javascript" src="https://www.googleadservices.com/pagead/conversion_async.js" charset="utf-8"&gt;&lt;/script&gt;
  </code></pre>
  
  <p><em>JS:</em></p>
  
  <pre><code>$.ajax({
      type: 'POST',
      url: "/contactSend.php",
      data: postData,
      success: function(result) {
          // CONVERSION TRACKING START 
          window.google_trackConversion({
              google_conversion_id: XXXXXXXXX,
              google_conversion_language: "en",
              google_conversion_format: "3",
              google_conversion_color: "ffffff",
              google_conversion_label: "XXXXXXXXXXXXXXXXXX",
              google_remarketing_only: false,
              onload_callback : function() {
                  console.log("Conversion Sent Contact");
              }
          });
      }
  });
  </code></pre>
  
  <p>However the client says the conversions are not registering even though the console log in registering correctly.</p>
  
  <p>Any help would be much appreciated.</p>