Track searches with AWStats
This How-to applies to:
Any version.
This How-to is intended for:
Server Administrators, Site Administrators
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"If you have the Google Co-op Product installed you may track the searches like this:
ExtraSectionCodeFilter1="200 304"
ExtraSectionCondition1="URL,\/search"
ExtraSectionFirstColumnTitle1="Search:"
ExtraSectionFirstColumnValues1="QUERY_STRING,SearchableText=([^&]+)"
ExtraSectionFirstColumnFormat1="%s"
ExtraSectionStatTypes1=PL
ExtraSectionAddAverageRow1=0
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=100
MinHitExtra1=2
ExtraSectionName2="coop searches"Note that you have to alter the names ExtraSectionXXXX1 to ExtraSectionXXX2 (and so on) for each Extra Section you add.
ExtraSectionCodeFilter2="200 304"
ExtraSectionCondition2="URL,\/googlecoop"
ExtraSectionFirstColumnTitle2="Search"
ExtraSectionFirstColumnValues2="QUERY_STRING,q=([^&]+)"
ExtraSectionFirstColumnFormat2="%s"
ExtraSectionStatTypes2=PL
ExtraSectionAddAverageRow2=0
ExtraSectionAddSumRow2=2
MaxNbOfExtra2=200
MinHitExtra2=2
An improvement for LiveSearch and elimination of search spam
The improved version looks like this:
# Track Plone searches:
ExtraSectionName1="Plone Searches"
ExtraSectionCodeFilter1="200 304"
ExtraSectionCondition1="URLWITHQUERY,\/search(?!.*%3Ca[+]href)||URLWITHQUERY,\/livesearch_reply(?!.*%3Ca%20href)"
ExtraSectionFirstColumnTitle1="Search:"
ExtraSectionFirstColumnValues1="QUERY_STRING,SearchableText=([^&]+)||QUERY_STRING,q=([^&]+)"
ExtraSectionFirstColumnFormat1="%s"
ExtraSectionStatTypes1=PL
ExtraSectionAddAverageRow1=0
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=100
MinHitExtra1=1
regards,
Darryl Dixon
Winterhouse Consulting Ltd
http://www.winterhouseconsulting.com
Very cool....
Is there a way you can track Live Searches as well?
BZ