Update on new tracking code

We've had a couple of reports from users that their traffic had gone noticeably down in the last day, coincidentally enough starting around the same time we released our new tracking code.

To be clear, most sites didn't have any problems, and their users are unconsciously thanking them for a faster loading experience. However, one thing became clear - the sites that were noticing a large effect also happened to be site that aren't exactly the fastest loading sites in the world.

As mentioned in our last post, the new method waits until the "onload" event has fired to track the page view. This doesn't happen until all javascript, images, and css are downloaded and parsed and your browser's "loading" bar disappears. (Safari does things a bit differently but that's not important here). So if your site has a bunch of third party widgets on it, or say 5000 images, or is hosted somewhere on an overloaded server or slow connection, the time for "onload" to fire can be as long as 10-20 seconds.

To address this, we've made a change to the code. Unless you have specifically defined the new clicky_custom.delay property, the tracking code will register an onload event as well as a timeout of 3 seconds to log the page view anyways. These won't both happen - whichever one fires first goes laughing all the way to the bank, and the other one goes crying home to mommy.

We think this is a good tradeoff. If your site loads in a decent amount of time, we'll wait for the onload event. But if it's slow, then we'll log a page view after waiting for 3 seconds to help ensure that we log as many of your visitors as possible.

If you want to override this either/or behavior, just specify the delay manually. Its value can be either "onload", in which case it will ONLY fire "onload", or the number of milliseconds you want it to wait (0 = no delay).
6 comments |   Feb 02 2010 5:46pm

Tracking code changes for a better user experience

We've just released a change to our tracking code that will help ensure the best user experience possible on your web site. You don't have to change anything on your site, the changes are in the code itself that is loaded via the script element.

Previously, as soon as our tracking code loaded, it would connect to our tracking servers to log the page view. The problem here is that if things aren't running under perfect conditions, that could interfere with the overall loading speed of your web site - especially if parts of your site depend on the "onload" javascript event.

We have changed the default behavior so that the initial page view is not logged until the onload event has fired. For users on very slow connections, or who browse between pages very quickly, this may result in slightly less accurate tracking. But we've been testing it all day on a few of our own sites (including getclicky.com) and there are no discernable differences in our numbers, so this should work well for everyone.

Of course, if you prefer the old behavior, you can change it via the new clicky_custom.delay parameter. Set it to the number of milliseconds you want the delay to be - "0" will result in no delay at all, emulating the old behavior. We recommend keeping it to the default setting however, unless it causes any problems with your tracking (and if it does, let us know).

The tracking code should be the very last thing in your HTML anyways, so changing the default to "onload" shouldn't change the accuracy - it will just let your site's "onload" events fire before we log data.

What about asynchronous javascript?

Google recently introduced asynchronous tracking for Google Analytics. Ultimately we'd like Clicky to have this option as well, but it's not as easy as it sounds and we can't make it the default behavior like we did with this change.

The main reason for that is because our tracking code has a number of javascript functions you can call after you include it in your HTML, and you're assuming that those functions are already loaded and ready. By changing to asynchronous, we'll have to create some kind of "queue" object for you to pass data to while you're waiting for the tracking code to actually be loaded (because you'll have no idea when that will actually happen). This will require a large rewrite of the tracking code, as well as a lot of documentation on the differences between the two methods.

The change we made today though should make a noticeable difference on your site. Logging data to our servers is generally much slower than downloading the tracking code, so this change makes a much bigger difference overall. Yes, the tracking code itself still must be downloaded before your onload event fires, but since we now use a global tracking code URL for all users, and we're tracking almost 180,000 sites, chances are fairly good that a user arriving at your site already has our tracking code cached in their web browser. And even if they don't, that will only affect their first page view. Every subsequent page view will benefit greatly from this change.

Of course, because they may have the old version cached already for up to 7 days, it will be 7 days before every single user on your site will be affected by this change. But in all likelihood, most of them will have it within 48 hours.
8 comments |   Feb 02 2010 12:02am

HOWTO: Only track visitors from certain countries

We get requests every once in a while to only log data from certain countries. We don't currently offer a way to filter out traffic other than by IP address. But there is a way to do this by adding a few extra lines of javascript to your site.

The service we use for geolocation is called Maxmind. They have a free javascript file you can put on your site that includes a few functions to determine that visitors location. You can use these functions to either call our tracking code only for certain countries, or only NOT for certain countries.

Say you only want to track US visitors. In the example below is our standard tracking code, with the additional code highlighted in red to only track US visitors. We're using [] in place of HTML tags:

[script src="http://j.maxmind.com/app/geoip.js"][/script]
[script src="http://static.getclicky.com/js"][/script]
if( geoip_country_code() == "US" ) clicky.init( YOUR_SITE_ID );

This can be used with any country of course, you just need to replace US with the appropriate 2-letter country code (in capital letters). You can view a list of standard 2-letter codes here.

If you want to do more than one country, say only US and Germany, you can do like this:

if( geoip_country_code() == "US" || geoip_country_code() == "DE" ) clicky.init( YOUR_SITE_ID );

You can also track all countries except the ones you specify. Say you wanted all traffic except US and Germany:

if( geoip_country_code() != "US" && geoip_country_code() != "DE" ) clicky.init( YOUR_SITE_ID );

That's all there is to it!
2 comments |   Jan 27 2010 3:05pm

New feature: Favorites

Are there certain pages on your site that care about the most? What about specific countries or cities or search terms or web browsers? Wouldn't it be nice if you could flag the ones you care about the most so you can always have instant access to their stats? Now you can!

When viewing almost any "popular data" report, you will see a star next to every item. Just click on any any star to flag that item as a favorite. Next time you view that report (e.g. refresh the page) all of your favorites will appear at the very top. This makes it very simple to track the specific items that matter the most to you.

For example, there are a number of pages on getclicky.com that we want to know their daily traffic for. Filtering content can take a while if you have tens of thousand of pages so the only real solution for this before was setting up a goal to track a page. But these aren't really "goals" - we just wanted quick access to the stats for those pages. This was messy and cluttered up our goal report.

This new feature makes tracking your most important stats a nice reality, and is available to all users. Here's an example screenshot with some of the pages that are most important to us, now at the very top of our content report.

8 comments |   Jan 26 2010 11:34pm

Google Analytics campaigns; Big updates for goals

It has been known by some of you that we were planning to add dynamic campaign support using the same tags that Google Analytics (GA) and Urchin use. We are happy to announce this has finally been released.

What does that mean? Previously on Clicky you had to pre-define your campaigns by giving us matching strings for your campaign landing pages. You could also specify referring domains, so any visitor who arrived via that domain was flagged as a campaign visitor. This worked pretty well but left something to be desired.

GA's campaign system is dynamic which makes it quite a bit more flexible. Instead of having to pre-define anything, you just add a couple variables to your landing page URLs and GA parses them automatically and it's basically magic. While I think our system has some advantages (e.g. you don't have to change the links for your ads to include new variables), we do have a ton of users that use both GA and Clicky together, so we thought that adding automatic support for GA campaigns into our system would make a lot of GA users happy when they started using our product.

If you have any GA campaigns running for your site, you should see that they now appear in our campaigns report automatically. They are grouped by the utm_campaign variable (the campaign name) and then broken down by unique parameter groupings, ordered from most to least visitors. Here's an example from one of our sites:

We had to blur out any identifying data but it should give a good idea of how the new campaign system works. And don't worry, the old campaigns are still there, and you can still create pre-defined campaigns. In other words, both systems can be active at the same time, and the data is reported together in the same report. We think is a powerful combination.

If you need help setting up GA campaigns, go to your campaign setup page on Clicky. There is some more information in there about them, along with links to relevant Google support documents for help setting them up.

Updates to Goals

In the screenshot above, you may have noticed a new column you don't normally see: Conversions. This is a great update to our goal system, and it doesn't just apply to campaigns.

Anytime you have a visitor who completes a goal, we grab all that visitor's metadata (country, web browser, etc) and increment the conversion count for each of those items. So as you browse the various reports on Clicky, you will see conversion metrics in almost all of them now. Here's another example:

You can now easily see which types of visitors are converting the best, both in terms of total number, and percent. You can also click the conversion number for any item, which will filter your visitors down to those who match that item AND have completed a goal. From here, you can get even more data about these visitors.

Conversion history

What if you want to see conversion history, though? Don't worry, we got that covered. When you click the red/green percentage to see a graph of the items history, it works just like it used to, except there will be an additional line showing you the # of conversions for each day as well. This screenshot doesn't show it terribly well since this has only been running for a few days, but it gives you an idea. The conversion line is green. You know, like money!

API conversion data

Conversion metrics are output with the API as well for any "popular data" request that supports it (which is almost all of them). There are two new keys: conversions, and conversion_percent. This hasn't been added to the docs yet but will be by end of day.

Goal funnels

Previously you could only set one campaign as a funnel for any goal. Now you can select multiple campaigns for a single goal, or NO campaigns which will make the funnel apply to ANY campaign.

Alerts for goals and campaigns

Like goal funnels, previously you could only set an alert for a single campaign or goal. And like the new and improved! goal funnels, you can now select multiple campaigns or goals for a single, OR, select none of them to get an alert when ANY campaign or goal occurs.

9 comments |   Jan 25 2010 3:11pm

Next Page »

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