title: Passing variable to window.location href
body: <p>I'm trying to delay outgoing links when clicked, so that googles event tracking have time to occur.</p>
  
  <p>I wrote the following code, but I'm unsure of how to pass my variable to window.location. It just adds it as string "url" and not the link adress. What am I doing wrong?</p>
  
  <pre><code>$("a.private-product-order-button").click(function(e) {
     e.preventDefault();
     _gaq.push(['_trackEvent', 'Order buttons', 'Click', 'Service']);
     var url = $(this).attr("href");
     setTimeout(function() {
        $(window.location).attr('href', 'url');
        }, 200);
  });
  </code></pre>