Sample Code/Templates
This simple and free PERL script (5Kb download) reads your Web search engine's log and produces a report listing your most popular search phrases in rank order. You will need to gain access to the log or a copy of it. Run this script with the log as your input, and the report will be your output. You may need to tweak the script a bit depending on the idosyncracies of your search engine's log format. A number of institutions have run this script as a low-overhead way to gain basic insight into search patterns. You might want to run the script periodically--say, once a month. With the help of your server administrator, you might be able to automate periodic running of this report.
And you might like to use this gently customized Microsoft Excel spreadsheet template to analyze your own query data. You'll need to paste in two columns: queries and query counts. The formulae should take care of the rest...
Comments
the loganalyzer script wouldn't run until i removed the "numerically" and "logdatewise" words after the sort keywords in lines 81 & 93.
otherwise perl would give an error message:
Undefined subroutine in sort at ./loganalyzer.pl line 81, line 7283.
Posted by: Jhauser | June 13, 2006 2:46 AM
$ ./loganalyzer.pl
Number of queries with n search terms:
Illegal division by zero at ./loganalyzer.pl line 87, line 1475.
Posted by: Tim Evans | October 5, 2006 10:48 AM