Web Stats Via CGI

F

Fuzzyman

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,237
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top