[WEB4LIB] Usage stats on the WWW
Roy Tennant
rtennant at library.berkeley.edu
Wed Nov 4 14:20:13 EST 1998
My private message to Andrea bounced, so I am posting it here. We are
doing that presently by sending our links to commercial databases through
a program that first logs the use, then redirects the user to the
resource. I doubt that they even know what happened, it happens so quickly
and transparently. See the sample Perl code below.
Roy
#!/usr/local/bin/perl
# CHANGE THE ABOVE LINE TO POINT TO YOUR PERL LOCATION
# YOU MUST HAVE 'cgi-lib.pl' OR ELSE USE SOMETHING ELSE TO PARSE INPUT
require ('cgi-lib.pl');
&ReadParse;
$log = "PUT THE FULL PATH TO YOUR LOG FILE HERE";
$path = $ENV{PATH_INFO};
$query = $ENV{QUERY_STRING};
print "HTTP/1.0 301 Document has moved\n";
print "Location: $query\n\n";
open GOLOG, ">>$log";
flock(GOLOG,2); # wait for exclusive
seek GOLOG, 0, 2; # seek to end, refresh buffers
print GOLOG join("\t, scalar localtime, $query,
($ENV{REMOTE_HOST} || "[unknown]")), "\n";
close GOLOG;
On Mon, 2 Nov 1998, Andrea Peterson wrote:
> Hello all,
>
> I went through the archives again and found a bit of discussion on
> gathering useful stats on WWW usage. A lot of people felt strongly that
> counters generate meaningless numbers and we ought to be able to find
> better ways to generate statistics on the use of our WWW resources. This
> discussion was over a year ago, and I was hoping some of you have found an
> accurate way to generate meaningful numbers and would be willing to share
> this information with me :-D
>
> As we look at moving many of our print and CD subscription to the WWW, I
> have been asked to find a way to count the amount of usage these databases
> will receive. Even if I set up a counter to generate numbers, I am not sure
> how I can get the counter to count individual databases. Are any of you
> doing this? Any suggestions would be appreciated.
>
>
> >:-I :-) ;-) 8-) =:-) ;-P >:-> :-0 :-D >:-I
>
> Andrea Peterson apeterso at accd.edu
> Automation Systems Librarian
> San Antonio College Library / LRC
> 1001 Howard St.
> San Antonio, TX 78212
> Phone:(210) 733-2669 FAX:(210) 733-2597
>
> >:-I :-) ;-) 8-) =:-) ;-P >:-> :-0 :-D >:-I
>
>
More information about the Web4lib
mailing list