Clicky API v4 released
In addition to the new wordpress plugin, today we're also releasing version 4 of our analytics API. We've got some really great new features outlined below. Full documentation is here.
The two big features for us are segmentation, and being able to specify a individual items. With these, and everything else, we feel the API is much stronger than v3.
We're releasing one today as a sneak peak. This is something that those of you with lots of sites may find quite useful. It's called "sites". (We're really creative). Pass it your username and password, and it will return to you all of the sites in your account, including their domain name, nickname, site_id, sitekey, sitekey_admin, and database server.
For example, here's a pretend account I just registered.
http://api.getclicky.com/api/account/sites?username=awesomeaccount&password=awesomepassword
And with PHP output:
http://api.getclicky.com/api/account/sites?username=awesomeaccount&password=awesomepassword&output=php
0 comments | Oct 30 2009 3:18am
- Segmentation data!
Example: Summary data + top countries and web browsers for visitors from twitter.com over the last 7 days
- Data for individual items (e.g. a specific country or search term). Note, this is different than the existing "filter" parameter, which is a wildcard (i.e., slow) match. This is an exact match string and hence very quick.
Example: Daily hits from google.com
- Hourly data for supported data types (visitors and actions)
Example: hourly data for both visitors and actions over the last 7 days
- Option to specify only the fields you want returned for type=visitors-list. This is a big one because we have a number of users who export their entire visitors-list every day. They may only want a few fields, but had to get all of them no matter what. If this applies to you, this new option will vastly speed up the response time for visitors-list queries.
Example: Only return IP, session ID, landing page, location, and browser
- Proper error responses. It's hard to believe that up until now, a bad request would just return completely empty. How helpful of us! Now, if there are any problems with your request, an error will be output.
Example: Forgetting the required "type" parameter. XML PHP JSON
- The XML parent element has been changed from "items" to the more standard "response". This parent element also has a new attribute, "status", whose value will either be "ok" or "fail". If it is "fail", there is an error with your request. The XML document will then have just one element, "error", whose value will be the error message. For PHP and JSON, which both return arrays, the array will only have one item, whose key will be "error" and whose value will be the error message.
- We've added a ton of inline examples throughout the documentation, so instead of perhaps being confused about what a certain feature does, you can just click a link and instantly see an example.
The two big features for us are segmentation, and being able to specify a individual items. With these, and everything else, we feel the API is much stronger than v3.
We like APIs. They're neat.
We're going to be adding some more APIs in the near future that let you get information about your account, as well as the ability to write data to Clicky, instead of just reading from it. For example, registering new sites, updating site preferences, creating goals, etc.We're releasing one today as a sneak peak. This is something that those of you with lots of sites may find quite useful. It's called "sites". (We're really creative). Pass it your username and password, and it will return to you all of the sites in your account, including their domain name, nickname, site_id, sitekey, sitekey_admin, and database server.
For example, here's a pretend account I just registered.
http://api.getclicky.com/api/account/sites?username=awesomeaccount&password=awesomepassword
And with PHP output:
http://api.getclicky.com/api/account/sites?username=awesomeaccount&password=awesomepassword&output=php
Happy Halloween weekend!
Don't drink too much! We'll see you in November.
0 comments | Oct 30 2009 3:18am

Recent Comments
Yes, it's in the docs. type=json Sean (Clicky), Nov 17 2009 Sorry to post it here, but cant post on the previous post. Does the API allow for ... Eric B, Nov 17 2009 Thanks Rob. You can click the red/green percentage next to "revenue" in "the basics" ... Sean (Clicky), Nov 13 2009 I LOVE your service. And thanks for all the continually added improvements and new ... Rob McEwen (invaluement.com), Nov 13 2009 Sean has very kindly assist me in troubleshooting the problem. It was due to a space ... Dayna, Nov 10 2009 Seems superb plugin, thanks for you effort. http://www.okus.in John Smith, Nov 09 2009 Hi Sean, I've checked, double-checked and triple-checked the site key is entered ... Steve, Nov 08 2009 We loaded Clicky on our site on Sunday, Novemeber 1 around noon. Is the new tracking ... Ron, Nov 08 2009 @Sean: I have emailed you the screenshot. Dayna, Nov 06 2009 Same of Dayna "Updated to the latest 1.0.4 but the URL generation problem still ... Diego, Nov 06 2009