A lot of people seem to run plugins or custom code on their site that automatically convert links to internal redirects, so that you can count them internally. For example, instead of linking to “http://getclicky.com/123” (affiliate link), you might link to “http://yoursite.com/go/clicky” instead. This page then redirects the person on to the real link.
The problem with this has been that our tracking code has no idea what’s actually going to happen once someone clicks that link. Without actually following the link, it simply appears to be an internal link, so we ignore it by default. There have always been several ways to track these links (CSS tagging and manual data logging), however these methods required way too much pain on your end. We don’t like pain.
So, we added a new customizable tracking variable today, called outbound_pattern. This allows you tell our tracking code, with just a few lines of code in one place, what your redirect URLs look like so that we can track clicks on them automatically. You can define it as a string, if there’s only one pattern we should be looking for (should apply to most of you), or if you have multiple patterns, you can define more than one in an array.
The most common redirect URLs that I’ve seen are one of these three:
http://yoursite.com/go/clicky
http://yoursite.com/outbound/clicky
http://yoursite.com/aff/clicky
What you’ll want to use as your custom outbound pattern is the the base part of these URLs, e.g. ‘/go/’ or ‘/outbound/’ or ‘/aff/’. You’ll want to make sure whatever it is you use though is unique to your redirects, otherwise other links may start getting logged as well.
Single pattern example:
var clicky_custom = {};
clicky_custom.outbound_pattern = ‘/go/’;
Multiple pattern example:
var clicky_custom = {};
clicky_custom.outbound_pattern = [‘/go/’, ‘/aff/’];
This code would go directly above your existing tracking code. And wrapped in HTML script tags of course.
If you’re running WordPress, our plugin has been updated to support this new functionality as well.
iframe tracking
A while back, we tried to make tracking iframes better, in an automated way. This ended up causing some problems though so we killed it fast. Now we’re bringing it back, but it’s disabled by default so it will only process if that’s what you want it to do.
Here’s the problem. If the tracking code is installed in an iframe, we track the iframe, but in most cases your goal is to track the parent document instead. Otherwise the page URLs and page titles you see in our reports will be for the iframe itself, and we won’t be able to log referrers.
So, if your goal is to track the parent document but can only put the code in an iframe or “widget” (e.g. with Apple’s iWeb), set clicky_custom.iframe=1, so that our code will grab the parent’s URL, title, and referrer.
99% of you that have the code in an iframe, your goal is to actually track the parent document. If this applies to you, set this variable, and you should be good to go.