title: Track Google Analytics and then redirect..?
body: <p>I've got a WordPress plugin that I'm going to be running some ad campaigns for and I'd like to send the users directly to the <a href="http://wordpress.org/plugins/paypal-for-woocommerce/" rel="nofollow">plugin directory page</a>, but I need to log the traffic so it shows up in my Google Analytics.  </p>
  
  <p>I'm trying to build a little "middle man" script I can use for this, but I'm struggling to find a working solution out of all the potential ones I'm finding.  </p>
  
  <p>I'm using the new Analytics tracking code:</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-2xxxx3-1', 'angelleye.com');
    ga('send', 'pageview');
  
  &lt;/script&gt;
  </code></pre>
  
  <p>From what I've read I need to add a javascript redirect into this, but delay it for 1 or 2 seconds so the Analytics will have time to track before the redirect happens.  I'm not good enough with javascript to get this done, I guess. </p>
  
  <p>Any info would be greatly appreciated.  Thanks!</p>