Custom outbound link pattern matching, and iframe tracking
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.
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.
6 comments | Feb 15 2012 12:03pm
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.
6 comments | Feb 15 2012 12:03pm

Recent Comments
Cool beans. We've been using local search on one of our sites for a while and it's ... Shaun Peet, May 16 2013 Not yet. But we will support that. Sean (Clicky), Apr 22 2013 I'll try again... "My search looks like this: http://www.rdo.co.uk/search/ ... Matt, Apr 22 2013 Yeah that's definitely an option. It would probably be a clicky_custom property though ... Sean (Clicky), Apr 19 2013 Yes the utm_custom tracking will be great. You say only apply to certain tags like ... Andy, Apr 19 2013 > Any way to get this to work when there is no explicit parameter in the URL? My ... Jean-Paull, Apr 18 2013 Here is my search string as it appears in browser; index.php?src=search&searc ... Chris Theisen, Apr 18 2013 Ah, so that is why Clicky stopped logging my dynamic sales goals a while ago... Ivan Arnaudov, Apr 18 2013 Nice feature, but.... we dont use search parameters. ( our sites have ajax searches, ... Gerwin, Apr 17 2013 Thanks for the response. I'll wait and check it tomorrow! Darin, Apr 17 2013