Extend your analytics suite with LightCloud counters

I have extended LightCloud with a simple counter library that can be used to:
  • count stuff in a very easily manner, for example number of signups on a given day
  • code counters dynamically and with very few lines of code
  • global and day based counters are supported
  • answer stuff like "how many profiles does a new user visit?" in a minimal lines of code
  • can be used to do metric based development or just for AB testing

Simple counter usage:

from lightcloud import counters

counters.update_counter('users')
assert counters.get_counts('users') == 1

Day counters (these counters will automatically split counts in dates they happen on):

from lightcloud import counters

counters.update_day_counter('new_user_plurking')
assert counters.get_day_counts('new_user_plurking')[0]['counts'] == 1

Inspiration

Here are some of the stuff that we track on Plurk - site usage of new users:

Plurk stats

This way we can see how our changes affect new users.

LightCloud counters can also be used for AB testing, since AB testing is basically counting and afterwards analyzing these counts.

Documentation

I'll add some proper documentation to LightCloud and LightCloud counters during this weekend. The code is checked in LightCloud thought:

Happy hacking!

Code · Python · Tips 6. Mar 2009
1 comment so far

What about counting uniques?

Post a comment
Commenting on this post has expired.
© 2000-2009 amix. Powered by Skeletonz.