Web Stats Via CGI
Fuzzyman
fuzzyman at gmail.com
Wed Oct 6 11:33:20 EDT 2004
More information about the Python-list mailing list
Wed Oct 6 11:33:20 EDT 2004
- Previous message (by thread): Re-executing the code object from a class 'declaration'
- Next message (by thread): Using select([sys.stdin]) on windows xp
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I've written a CGI that combines with a little bit of client side Javascript. It gathers web usage statistics like http://www.sitemeter.com So far I've only got as far as grabbing the information - not presenting it. If anyone wants a sneak preview it's called pystat. You can see it in action at http://www.voidspace.xennos.com/pystat.html gathers the 'hits' whilst http://www.voidspace.xennos.com/cgi-bin/pystat.py?site=voidspace presents the data. I have no problem gathering the data I need from the CGI/javascript combination but mining meaningful data from the results will be a bit of work. Before I explain the problem I have two basic needs : A pure python graphics library - to produce graphs with. I can't install PIL (or anything on the server) and wondered if anyone knew of or could reccommend a pure python one. I haven't googled yet, but if anyone knows of a good one it would be handy. Secondly can anyone reccommend an approach to storing the data and analysing it ? The information will be page visited, date and time, refferer URL, and user-agent. Having gathered this information I would like to be able to present averages per week, average per month, total per week, total per month etc So the information needs to be stored and then analysed by date. Now I could just store it in a dictionary keyed by day and recalculate it all every time. I wondered if anyone else had already 'solved this problem'. I'm wondering if I should set a cookie as well, so that I can gather stuff like 'first visit' and returning visit and also distinguish between individual users and page views. Regards, Fuzzy http://www.voidspace.org.uk/atlantibots/pythonutils.html
- Previous message (by thread): Re-executing the code object from a class 'declaration'
- Next message (by thread): Using select([sys.stdin]) on windows xp
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list