I am interested in finding (or eventually developing) a module which records simple daily statistics, on things such as:

  • the number of profiles of each role type
  • the number of profiles which have been active in the last 24 hours/7 days/30 days

The first statistic would help me to keep track of the growth in different roles in the site.
The second statistic would help me to keep track of the real growth in usage (e.g. if "basic" users have grown from 100 to 500, that is one thing, but if the number of users in the last 24-hour users is steady at 50, then the site is not really growing).

I imagine a very simple table/database log format, which is, for example, added to daily from a CRON job:
Date1 role1_count role2_count role3_count 24hour_count 7day_count 30day_count
Date2 role1_count role2_count role3_count 24hour_count 7day_count 30day_count
Date3 role1_count role2_count role3_count 24hour_count 7day_count 30day_count
....
DateN role1_count role2_count role3_count 24hour_count 7day_count 30day_count

where today is DateN+1.

Does such a thing, or even anything remotely similar, already exist? If so, what module(s)?

If not, do you have any suggestions to help in the design of such a module? In particular any suggestions on making such a module extensible (e.g. for people to easily add their own stat definitions) or usable by other modules (e.g. that plugged with this to give extra functionality)?

Or do you have any statistics which you think you would like to see or find useful in such a module?

Thanks!

Comments

drupalshrek’s picture

[Note to myself]

One module which has at least similar functions is:
http://drupal.org/project/user_stats

drupalshrek

drupalshrek’s picture

[Note to myself]

If you get a bit further, you should consider proposing the idea on the Contributed Module Ideas group:
http://groups.drupal.org/contributed-module-ideas

drupalshrek

drupalshrek’s picture

The idea has now been added to Contributed Module Ideas group:
http://groups.drupal.org/node/95734

drupalshrek

drupalshrek’s picture

The idea has now been added to Contributed Module Ideas group:
http://groups.drupal.org/node/95734

drupalshrek

drupalshrek’s picture

[Note to myself]

Quant may be an answer to the problem:
http://drupal.org/project/quant

From http://www.mediacurrent.com/blogs/analysis-acquias-drupal-commons:

I’d also like to point out that the custom module Acquia wrote to display statistics to group moderators (called Quant, and now available on drupal.org) is pretty sweet. Thanks to my senior-year AP Statistics teacher Jason Smith, I’m fascinated by statistics, and I’ve tried and failed to write a comprehensive, extensible module to collect and display stats about a Drupal installation without writing dozens of complex SQL queries. To whichever Acquia engineer wrote the Quant module, please accept my hearty congratulations.

drupalshrek