title: Page get redirected on Google Adwords Conversion Tracking
body: <p>I've form where people submit data and the data is sent to the server using ajax. I've setup this as a conversion in Google Adwords. Below is the code that I've used.</p>
  
  <p>The problem is, when a user submits the form, after getting the response, its redirected back to URL that I've given. I don't want to redirect!!</p>
  
  <p>(Data submitted is using Vue-resource since this project is in VueJS)</p>
  
  <pre><code>submit() {
    let self = this
    this.$validator.validateAll().then(success =&gt; {
      if (!success) {
        return;
      }
      document.getElementById("submitQuote").value = "Submitting...";
      this.$http.post(store.state.url+'api/submit_quote.php', {
          formData: store.state.formData
        })
        .then(response =&gt; {
          console.log(response.data)
          this.submitted = true
          self.reference_id = response.data
          goog_report_conversion('https://www.example.com/') //report Google that a conversion has occured
        });
    });
  }
  </code></pre>
  
  <p>Code given by Google</p>
  
  <pre><code>&lt;!-- Google Code for Add to Cart Conversion Page
      In your html page, add the snippet and call goog_report_conversion
      when someone clicks on the chosen link or button. --&gt;
      &lt;script type="text/javascript"&gt;
       /* &lt;![CDATA[ */
      goog_snippet_vars = function() {
        var w = window;
        w.google_conversion_id = 12345678;
        w.google_conversion_label = "abcDeFGHIJklmN0PQ";
        w.google_conversion_value = 13.00;
        w.google_conversion_currency = "USD";
        w.google_remarketing_only = false;
      }
      // DO NOT CHANGE THE CODE BELOW.
      goog_report_conversion = function(url) {
        goog_snippet_vars();
        window.google_conversion_format = "3";
        var opt = new Object();
        opt.onload_callback = function() {
        if (typeof(url) != 'undefined') {
          window.location = url;
        }
      }
      var conv_handler = window['google_trackConversion'];
      if (typeof(conv_handler) == 'function') {
        conv_handler(opt);
        }
          }
      /* ]]&gt; */
      &lt;/script&gt;
      &lt;script type="text/javascript"
      src="//www.googleadservices.com/pagead/conversion_async.js"&gt;
      &lt;/script&gt;                                                  
  </code></pre>