Now that the application is built and you're collecting and analyzing data, the time has come to think about next steps. We make a handful of suggestions about other things this application could do to improve data collection, performance, or reliability.
As we've gone through the book, we've built a program to collect data from visitors to your web site, and a program to analyze the data and produce some basic statistics. In this final hack, we're going to remind you how to run the application and discuss ways in which it could be extended.
You can get both programs from:
You will also find a sample logfile there to allow you to run the second program without waiting to collect any data of your own first.
Remember that this application depends on a small piece of
each page you want tracked. All you need to do is add the following
code near the top of the <
BODY> element of each of your web
<script> document.write('<img src="/cgi-bin/readtag.pl?url= '+escape(document.location)+'&ref='+escape(document.referrer)+'">'); </script>
To process the code, you'll use the readlog.pl Perl script that we developed throughout most of the book. To execute this program from the command line, assuming that page.log is in the same directory as readlog.pl, all you need to do (assuming you've already installed the GeoIP ...