How do you track page hits or click statistics?

howard chen howachen at gmail.com
Sun Nov 4 09:59:56 UTC 2007


On Nov 4, 2007 9:29 AM,  <dangalist at centrum.cz> wrote:
> I am trying to figure out problem, how to effective track click statistics like user profile views
> without hitting database or writing statistics to flatfile and processing by cron. It would be best
> to save them directly into memcache so they can be globally available, then run in periods
> database updates. The problem is that there could be thousands of different profiles to count stats for
>  so using increment function is not an option.
> Best would be if memcache would support "append" so I could save all hit IDs under one memcache
> key and then process the list to count frequency of IDs and issue db update.
> So my question is, how do I handle such cases to have statistics written into shared place to process later DB update?
>
> Goodwill
>
>

you don't need extra logging program, just place a random gif at your
page where you can easily redirect all the stats to your httpd access
log, write a program to parse it afterward.


More information about the memcached mailing list