loading...
I use Clicky for most of my day-to-day tracking and analysis, only using Google Analytics for the harder analyses. One of the things Clicky can do most wonderfully is track outbound clicks. There’s an issue however when you start routing your affiliate links through a script or on-site redirect. I redirect mine through /out/ here on yoast.com, but not all of the /out/ links need to be tracked. Let me show you how I do track the ones I need to track.
Forcing Clicky to track a link as outbound
First of all, you need to know that when you add a class clicky_log_outbound to a link, Clicky will track each click on that link as an outbound link. Now I always add a class track or aff to my affiliate links that I want to have tracked, for instance:
<a class="track" href="http://yoast.com/out/clicky/">Clicky</a>
Of course I could manually add the clicky_log_outbound class, but that’s just a tad bit too much work, especially as most of my links have been “classed” already and I might want to use this class for other stuff later on.
Now, I add a tiny filter function to my sites functions.php file, this searches for links with class aff or track and adds the clicky_log_outbound class:
function clicky_outbound_filter( $content ) {
$content = preg_replace('/<a([^>]+)?class="(aff|track)"([^>]+)?>/',
'<a1class="2 clicky_log_outbound"3>', $content);
return $content;
}
add_filter( 'the_content', 'clicky_outbound_filter', 10, 1 );
That’s it! Clicky will now track those links as outbound. Now let’s set such a link up as a goal.
Goal Tracking in Clicky
For goal tracking you need to have a premium (read, paid) Clicky account, but it’s well worth it. Setting up a goal is a piece of cake. You go to your site’s analytics and then to Goals, Setup. You’ll see this interface:
![]()
You simply name the action, set the goal URL to be your outbound URL, you could do /out/clicky/ or, when you sometimes forget the last slash, /out/clicky*. You can set up revenue and even a funnel, a required page before one can reach that goal.
Once you’ve done that, the goals will show, in realtime, in your Goals overview and in your “bigscreen” Clicky display.
More tracking power: campaigns
This feature becomes even more powerful when you combine it with another great feature of Clicky; campaign tracking. Clicky fully supports the _utm type variables Google Analytics uses, so you can track campaigns and terms within campaigns. That is, in fact, how I did the tracking in yesterdays post about WordPress Dashboard widgets.
Tracking Outbound / Affiliate Links with getClicky is a post by Joost de Valk on Yoast – Tweaking Websites.A good WordPress blog needs good hosting, you don’t want your blog to be slow, or, even worse, down, do you? Check out my thoughts on WordPress hosting!


Google used to have access to the Twitter firehose, all the tweets coming in in realtime, enabling them to index tweets at light speed. Facebook used to show some friends of a person on a profile to visitors to that profile who aren’t logged in, now look at