setup URL Destination Goals withing jQuery
<p>I recently tried to setup a Google Analytics URL Destination Goal which triggers on a button-click. I setup the click-event inside jQuery. The button has another click-event, which makes an ajax call but it's not important for the destination goal and I'm getting no errors at all.
When I remove some essential parts of the code I do get an error message, so the call is actually triggered.
Still it's been 3 days now and there aren't any conversions, so I guess I'm doing something wrong.</p>

<p>I hope someone can help me :)</p>

<p>Here are the codes:</p>

<p>This one's after the body opens:</p>

<pre><code>&lt;script&gt;
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-XXXXXXXX-X', 'auto');
  ga('send', 'pageview');

&lt;/script&gt;
</code></pre>

<p>and here's the jQuery code right at the bottom of the body:</p>

<pre><code>&lt;script&gt;        
    var _gaq = _gaq || [];
    _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
    _gaq.push(['_trackPageview']);

    var target = $('#button');
    target.on("click trackClick", function()
    {
        _gaq.push(['_trackPageview', "http://www.examplePage.com/toTrack"]);
    });
&lt;/script&gt;
</code></pre>

<p>EDIT: Oh yeah, the page that is tracked doesn't actually exist, but I read about it being the best solution to track a non-existing page to track button clicks.<br>
I set the match type to "exact match" btw :)</p>