AWStats tricks
Feb 13th, 2007 by Karen
We’ve been examining and considering revamping the site search tool this week. As part of that process we wanted to examine the search terms that users were putting into our site search box. In particular we were concerned that people were using this box to search for articles and books rather than understanding it searches just the website itself. To get results about the search terms we used the ExtraSection functionality in AWStats. The ExtraSections functionality lets you create custom reports that you can use. Below are the lines that create our search terms report.
# the new website search results section ExtraSectionName1="Website Search" ExtraSectionCodeFilter1="200 304" ExtraSectionCondition1="URL,\/search\/index\.html" ExtraSectionFirstColumnTitle1="Search Term(s)" ExtraSectionFirstColumnValues1="QUERY_STRING,criteria=([^&]+)" ExtraSectionFirstColumnFormat1="%s" ExtraSectionStatTypes1=PL ExtraSectionAddAverageRow1=0 ExtraSectionAddSumRow1=1 MaxNbOfExtra1=1000 MinHitExtra1=1
Adding these lines gets me a report that lists all of the search terms users input into our site search box and their frequency. Additionally, the ExtraSections feature can help you create other types of custom report. You can monitor hits in a given directory, or look at RSS Readers. There is an excellent article that talks about how to do this over at Antezeta. Also be aware that you can setup AWStats to store all of its data in XML form. This can then be used to create your own custom reports as well. While I haven’t attempted this yet, I can definately see applications for this to analyze the UH Libraries server log files.

