Forums » Developers



Major change to pages database structure coming soon

We're currently overhauling the database tables that store all data related to the pages on your site (URL and titles). If you use the clicky.log() function at all on your site to manually track clicks and other actions, you definitely need to read this post. Otherwise, you probably don't, but reading it will give you a sneak peak of a few major features coming soon.

There are two big reasons we're doing this.

First, unique pages are currently determined by a combination of the URL and the title. This causes a lot of problems with the same page being tracked in different clumps within your stats, as your visitors without javascript don't send in a page title, and if your titles have any foreign characters in them, or extraneous spaces and/or linebreaks in the middle of them, different browsers can send these to us in different ways, which results in a differnet page being tracked in the database, even though the URL is the same. The new design will fix this problem, and unique pages will now be determined based solely upon the URL.

Second, a few major features we have lacked for way too long are being able to filter your visitors based on having viewed a certain page, and also being able to analyze individual pages to give you data about them such as top searches leading to that page, top countries viewing that page, average time spent on that page, bounce rate, before/after funnels, etc. We've wanted to add this stuff forever, but the design of the original system made it impossible to do with any kind of efficiency. But now that every URL will only have one unique ID associated with it in the database, these features will become a reality very soon.


So, the major reason for this post for anyone using clicky.log()... Unique pages will determined solely based on URL now, and the title for each page will be stored in a seperate table that links the site_id and page_id together. This means that each unique URL logged to our system for any one web site can now only have ONE title. But all actions on your site are stored in this same table, so this change will affect downloads, outbound links, and "clicks".

If you are already logging unique URLs for each seperate item you're tracking, then you have nothing to worry about. The problem is that some of you (ourselves included) are using the URL as a category for a type of click, and the title as the unique part of it. For example when you click on any of the sub-tabs within any Clicky dashboard module, we log those clicks like this:

onclick="clicky.log('#dashboard/tab', 'Title');"

...with "Title" being the unique part - e.g. "Countries", "Cities", "Languages", etc.

So if you are doing anything like this, you will need to start making the URLs unique as well. What we're going to do for Clicky is change the tracking to be like below. In this example we'll use countries as the sub-tab being clicked:

onclick="clicky.log('#dashboard/tab/countries', 'Countries');"

These changes may be live as soon as next weekend (Jan 24), but depending on how long the conversion takes on some of our larger servers (db1 I'm looking at you), it won't likely be live until the weekend after that (Jan 31).

Posted Sat Jan 17 2009 2:04p by Your Friendly Clicky Admin


Will there be a new version of the API released to take advantage of the updated database structure?

Posted Wed Jan 28 2009 6:15a by andrewrim***


Yes

Posted Wed Jan 28 2009 10:34a by Your Friendly Clicky Admin


You must be logged in to your account to post!