Warning

This document hasn't been checked for compatibility with current versions of Plone. Use at your own risk.

Track searches with AWStats

by Christian Ledermann last modified Dec 30, 2008 03:03 PM
The log analyzer AWStats is a free powerful and featureful tool that generates advanced server statistics graphically. Configure your Extra Sections to track what your users are looking for.

The AWStats ExtraSection features are powerfull setup options to allow you to add your own report not provided by default with AWStats. You can use it to build special reports.

Explanation on how to add/edit an Extra report in your config file
Take a look inside the AWStats config file to find the following part:

#-----------------------------------------------------------------------------
# EXTRA SECTIONS
#-----------------------------------------------------------------------------

Read all explanation in config file after this point, they will explain you how to add an Extra report by adding an ExtraSection configuration in your config file.

To track all searches add this section:

ExtraSectionName1="Plone Searches"
ExtraSectionCodeFilter1="200 304"
ExtraSectionCondition1="URL,\/search"
ExtraSectionFirstColumnTitle1="Search:"
ExtraSectionFirstColumnValues1="QUERY_STRING,SearchableText=([^&]+)"
ExtraSectionFirstColumnFormat1="%s"
ExtraSectionStatTypes1=PL
ExtraSectionAddAverageRow1=0
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=100
MinHitExtra1=2
If you have the Google Co-op Product installed you may track the searches like this:
ExtraSectionName2="coop searches"
ExtraSectionCodeFilter2="200 304"
ExtraSectionCondition2="URL,\/googlecoop"
ExtraSectionFirstColumnTitle2="Search"
ExtraSectionFirstColumnValues2="QUERY_STRING,q=([^&]+)"
ExtraSectionFirstColumnFormat2="%s"
ExtraSectionStatTypes2=PL
ExtraSectionAddAverageRow2=0
ExtraSectionAddSumRow2=2
MaxNbOfExtra2=200
MinHitExtra2=2
Note that you have to alter the names ExtraSectionXXXX1 to ExtraSectionXXX2 (and so on) for each Extra Section you add.


Contribute

Something wrong or out of date? Anybody can edit or create a new article in the knowledge base. Simply create an account on this site, log in, and click the Edit button to contribute.