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 "" (affiliate link), you might link to "" 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:

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

Long term metrics, and other goodies

Our newest update is all about the long term, and it's one of the best things we've ever done. I'd recommend grabbing a fresh pair of pants before reading on because you're going to need them before you're done reading this.

It all started out innocently enough: A fairly simple update to goals that before I knew it had morphed into something else entirely. 80% of the stuff in this update was never planned, all of these ideas just starting coming to me as I kept working on it. "Hmmm this would be sweet, oh this too, oh and this..." Within days my bullet point todo list for this update was ridiculously long and ended up taking almost 3 weeks to complete. But that's the way it usually goes when I feel I'm on to something good.

New goal report

The main goal report still looks the same - until you click on a goal, that is. This new "single goal" report is awesome. Here's an example of one goal we track for new users registering with Clicky:

Talking points:
  • You can now graph all goal metrics (conversions, conversion rate, revenue [not shown], visits to goal, and time to goal), simply by clicking on any of those large-sized metrics at the top of the report. Previously you could only graph conversions. We've had a million requests to graph this other data - now you finally can. We considered graphing all of them at once but they all have vastly different scales and it simply did not work well.

  • "This visit" and "first visit" - Like most non-enterprise level services, Clicky used to only give you "this visit" data, e.g. data from the current session where the visitor converted. While interesting, most visitors do not convert on their first visit to your web site, so this data doesn't show the long term effects of your marketing efforts - example, which campaign they originally came in from when they bought something two weeks later, or what site they originally were referred by, if any.

    And that's exactly what "first visit" is all about. When a visitor converts, we now look up both their current session and their very first session on your site (that we know about it) immediately and summarize it in a table that lets us generate this report really fast, even over large date ranges. I can pull up this new report for a 30 day date range for any of the goals we track in less than 1 second. Not bad!

    Going down these two new columns are five categories (only two are shown here to keep the size reasonable). These categories are campaigns, referring domains, searches, split tests, and goals, which we feel are the most relevant metrics to track in relation to tracking conversions. Previously you could see this data if you filtered your visitors by a goal then chose the appropriate segment, but we wanted to bring these important metrics front and center and make it load super fast.

    Trends are also shown for all data types in this/first visit columns, and you can of course click the red/green percentage next to any of them to graph historical data just like you can with any other report. Of note however is that we've only been tracking this data for 3 days, so there isn't much history yet.

New visitor details page

The old visitor details page did the job, but I used to refer to it as "Old Betty" if that tells you anything about my feelings towards it. I wanted to make it look nice, and add way more details to it. So... I did!

  • Jam packed with details - Click here to see what this report used to look like, for the same visitor. There used to be a lot of wasted white space, with things like one line for browser, one for OS, and one for screen resolution. These are all related, so why not group together? Same with hostname/org, IP + ARIN/RIPE lookups, etc.

  • All time goals - Everytime a unique visitor completes a goal for the very first time, we've logged it to a table for over a year now I think. This was originally so we could calculate the "time to goal" and "visits to goal" metrics, making sure we were only counting each person once per goal. While making this new update, I realized how interesting this data could be. I can't believe we've had it for as long as we have and never shown it to you like this. So, that's what this is. Every unique goal that this unique and beautiful snowflake has ever completed is shown here, in chronological order, with the date shown next to each one. Clicking on that date will take you to the session where they completed this goal!

  • This visit / first visit - Just like the new goal report, we also show this kind of information in the visitor details pain now. So now whenever you're viewing the details for any of your visitors, you can immediately see interesting details from their first visit as well - including how long ago it was (in this example, 288 days and 15 hours ago). Want to see that first visit? Click on the date. Bam.

Oh, you thought we were done?

New visitors report

  • Reorganization - If you use goals or campaigns, icons for those were shown near the left for visitors who had either one attached to them. The problem with this is that most visitors don't have goals or campaigns attached, so this added a lot of empty white space in the middle of the report which always bothered me. So, we moved these icons to the very right hand side of the report. (This example is a bit cluttered because I filtered by visitors who had completed any goal, just to make sure there was lots of things to see).

  • Direct Spy access - In the screenshot above, you'll see a third icon as well next to some visitors. What is this? Oh, it's only the best thing ever! If you're old school, you'll recognize this used to be the icon we had for the Spy report, before we removed the icons because we ran out of space. If you see this eye, that means that the visitor is online now, and you can click the icon to go straight to Spy with this visitor already pre-filtered! (If you don't have a premium account, you don't have Spy, so instead we just show a green dot icon indicating their online status).

    (My only problem here is that the eye icon is available as a choice to you when setting up goals and campaigns. So you might want to change that if you're using it for anything, to prevent confusion. But there is no better icon to represent what this new function does, so I had to use it. Had to.)

  • Quick access to visitor details - So those visitor details I was just telling you about before? Well, there's no need to actually go to the visitor details page anymore, because they're now available directly on the main visitors report. Next to the "actions" link (e.g. "3 actions"), is a grey arrow pointing top right. Click this icon and you'll immediately see the full visitor/session details page in a lightbox without having to go to a new page.


The code that generates graphs when you click on a trend (those red/green percentages) was a mess and had been rewritten multiple times in several places for specific functionality. This is called horrible design. I took the time to rewrite it from scratch and it's way smarter and centralized in one place now, as it should be. Previously this code was unable to graph anything that had a parent/child relationship - for example, the this/first visit columns in the new goal report, that data is stored as "children" of the "parent" goal. I wouldn't have been able to let you graph this without rewriting this awful code. I really had no choice here.

So what's the bonus? Well, if you use our Twitter keyword monitoring, of course we keep history for all of that data - but we never showed you the trend percentage because we didn't want you to try to click it and have nothing happen (this data is stored with same parent/child relationship in the database). But since that mess is fixed, I have enabled the trends on the Twitter report, including the ability to graph any of them by clicking it. I use our Twitter monitoring a bit obsessively so, considering we released this feature almost 3 years ago, it's about damn time is all I have to say.

One more thing

From a UX perspective, the fact that we graph both hourly and daily data using the same colors is confusing, because we only log some data as hourly, and we show hourly by default if we have it. The only solution I can think of is to have the two types be different colors, but I can't find anything that works with our overall color scheme. We have a heavy emphasis on blue and orange. So I tried changing one of them to orange, and it looked horrible (screenshot). I'm just wondering if anyone has any ideas in this department, because I'm at a loss.

Ok, one more

In development for 2 months now is our path analysis feature. We're still working out the wiggles but expect it to be out within a few weeks and it will make an excellent partner to goals (although of course you will be able to use it without goals).

20 comments |   Feb 01 2012 9:46pm

Count your chickens while they're still hatching

About 3 months ago, Google announced that all users logged in to their Google account, their search terms would be hidden from the referrer string when they clicked through. Net result is no trackers can see these search terms (surprisingly, this includes Google Analytics). Google says this is for privacy reasons. That's great, but I've said a thousand times, search analytics is one of the best reasons to run analytics in the first place so it sucks for site owners.

Anyways, the way our code processed blank search terms, they would show up like this:

This has led to a lot of confusion and many people thinking Clicky is broken, because they weren't aware of this change on Google's end (understandable).

Google updated their Analytics product to show the search as "(Not provided)" if it was blank. We've decided to do the same thing, although we are labeling it as "[unknown]" instead:

(Update: Per request, we changed this to [secure search] instead)

The main difference though is that this will now show up in your main searches report too. Previously blank searches just weren't logged in there. Now you will see an item for "[unknown]", and unfortunately it's probably pretty high on the list. For our own stats on, it's the #3 "search term", representing about 1 out of every 6 searches.

I wouldn't be surprised if Google made this the default for all searches on Google sites within the next year or two. Hence I say to you, count your chickens etc, because that will be a horrible day for site owners the world round.

At the very least however, I am happy to know that Google is not providing a back door to their own analytics product that allows them to log the searches but not anyone else. That would just be evil, not to mention anti-competitive.
22 comments |   Jan 04 2012 10:40pm

Load balancing the load balancers

Load balancing your load balancers sounds a bit ridiculous but yes, that's what we have to do to scale.

For about three and a half years, we've had a single pair of load balancers. One active, one in "hot standby" mode to take over if the active one goes offline. It's worked really well, but they were reaching capacity. I've pulled all sorts of tricks out of my hat to reduce excess load, but the time finally arrived where new hardware was the only option left.

So, we just added two more load balancers to the equation. But these new ones are twice as powerful as the old ones, and instead of active/passive pairing, they're both active. This means we have a total of three active load balancers, and these are load balanced with DNS round robin, with DNS monitoring/failover on top of that to quickly and automatically remove one from the pool in case it has a problem. The old ones act as a front for our entire service with a bunch of virtual services running on them, and hence remain paired (keeping them in sync would otherwise be a nightmare). The new ones are just for additional tracking capacity and nothing else though, so this setup is great for us.

Speaking of tracking capacity, this just quintupled it to ~25,000 pageviews/second. Just in time too, because last year, online activity on "Black Friday" and (cringe) "Cyber Monday" sent a ton of extra traffic our way and knocked us offline for a bit. This year, we're ready, so bring it!

Something else we just changed today is that the static resources for our web site are no longer hosted on "". A problem common with many trackers is that their domains are on blacklists of ad-blockers and other privacy software. These days, almost weekly we get an email from someone saying our site looks funny. This is because their browser, or their OS, or their ISP, or who knows, is blocking from loading anything, so the stylesheet doesn't get loaded (nor any of the images, javascript, etc).

But we've had a secondary domain, "", that we've used as a generic CDN domain for our white label service for a while now. I had to change a few things around and get SSL running on it, but now that that's done, all assets for our web site (except the tracking code itself) will load from this domain instead. It points to the same servers, but it should bypass 99% of these blacklists because they are almost always based on domain name.
7 comments |   Nov 15 2011 1:28am

Google search rankings :D

Considering how much Google has been playing the privacy card recently, I'm surprised they do this, but it turns out the referrer string for Google searches typically includes a variable in the URL, "cd", which signifies the approximate ranking of the link someone clicked on to get to your site for a search term. e.g. "1" would mean your page was the top result.

We've had requests to parse this data. As of about 20 minutes ago, we are now doing just that! (Pro+ account required).

Note that this is passive, in other words, we only have the data that Google gives us as people click through on search results. We're not scraping SERPs, and we only have this data from Google because they're the only ones who do this. (If any other major engines do it too, let us know and we'll try to add it). If you want scraped results, you should use our SheerSEO integration.

The screenshots below show how we report this data (5 different places - Spy is my favorite). Keep in mind the data shown in these screens is from our own stats and it's only been live for a short time so there's only a few results logged so far. But I took a peak at some super high traffic sites to see what the reports looked like there, and it's awesome.

Also, the ranking numbers you see for any given search are the average of all searches for that term. Not all visitors see the exact same search results! So if you had two people with a search and one saw it at position 4 and the other at position 5, the number reported would be 4.5.

First, rankings integrated right into the main search report:

But of course there's also a report dedicated to just rankings, and in this case, they are sorted from best to worst rank (menu included in the screen so you can see where to go to get this):

We integrated it into the "keywords" report too, so you can see your average ranking for any given single word. Note that the ranking numbers in this shot aren't accurate, since we're dividing the sum of all rankings for any word by the total number of searches for that word on that day, and since we only have ranking data for 20 minutes so far today, the divisor is out of proportion. Come tomorrow, it will be correct.

We also added it to the dashboard search module:

And last but certainly not least, we put it in Spy, which is my absolute favorite. As live searches from Google stream in, we'll show you the ranking right there (if it's included in the referrer string). You might also notice we're now showing the search in the same way we used to with the old version of spy, where it's a separate string instead of just the full referrer string which is harder to read searches from:

I freaking love this and hope you do too!!
30 comments |   Nov 10 2011 10:22pm

Next Page »

Copyright © 2018, Roxr Software Ltd     Blog home   |   Clicky home   |   RSS