Search Keywords/Phrases by Search Engine
AWStats provides a standard list of search engine keywords and keyphrases where there is a unique entry for each search phrase.
With our separate lists of search engine phrases for every major search engine, we often see that our successful keywords can be different for Google, Yahoo! Search and Bing (formerly Live.com, from Microsoft). You can edit our examples and make your own selection of search engines. You can also split results by country (search engine top level domain) : google.com, google.co.uk, google.co.jp, google.com.au,…
We list the complete search phrases, including quotes and other special characters, as the visitor from the search engines type them in.
You can add the Extra Sections below at the end of your awstats.your-domain-name.conf configuration file.
New Report

This AWStats screen has been simulated for better readability.
Extra Sections
ExtraSectionName1="Google Search Keywords/Phrases"
ExtraSectionCodeFilter1="200 304"
ExtraSectionCondition1="REFERER,^http:\/\/www\.google\.[^/]+\/search\?.*q=.*$"
ExtraSectionFirstColumnTitle1="Search Phrases"
ExtraSectionFirstColumnValues1="REFERER,[?&]q= *([^& ][^&]*[^& +])[ +]*(&.*)?$"
ExtraSectionFirstColumnFormat1="%s"
ExtraSectionStatTypes1=PHBL
ExtraSectionAddSumRow1=1
MaxNbOfExtra1=10
MinHitExtra1=1ExtraSectionName2="Yahoo! Search Keywords/Phrases"
ExtraSectionCodeFilter2="200 304"
ExtraSectionCondition2="REFERER,^http:\/\/(\w*\.)*search\.yahoo\.[^/]+\/.*$"
ExtraSectionFirstColumnTitle2="Search Phrases"
ExtraSectionFirstColumnValues2="REFERER,[?&]p= *([^& ][^&]*[^& +])[ +]*(&.*)?$"
ExtraSectionFirstColumnFormat2="%s"
ExtraSectionStatTypes2=PHBL
ExtraSectionAddSumRow2=1
MaxNbOfExtra2=10
MinHitExtra2=1ExtraSectionName3="Bing – Live Search (Microsoft) Keywords/Phrases"
ExtraSectionCodeFilter3="200 304"
ExtraSectionCondition3="REFERER,^http:\/\/(search\.(msn\.[^/]+|live\.com)|www\.bing\.com)\/.*$"
ExtraSectionFirstColumnTitle3="Search Phrases"
ExtraSectionFirstColumnValues3="REFERER,[?&]q= *([^& ][^&]*[^& +])[ +]*(&.*)?$"
ExtraSectionFirstColumnFormat3="%s"
ExtraSectionStatTypes3=PHBL
ExtraSectionAddSumRow3=1
MaxNbOfExtra3=10
MinHitExtra3=1
MaxNbOfExtra* is the number of lines that will be listed. Use the most convenient value.
Further Technical Details
Leading and trailing spaces are removed from search phrases.
Phrases with upper and lower case letters are listed separately.
February 19th, 2007 at 11:43 am
Hello, thanks for these great tips. I’d like to add more search engines such as http://www.google.com/xhtml (google mobile), do you know how I should write the referrer in regex for that kind of url (with a / after .com)?
Thanks!
February 19th, 2007 at 2:01 pm
My understanding is that these Google Mobile pages do not link to your web site. When you click on a link in these search results, a Google robot reads the page and reformats it for the visitor. As far as I know, your reformatted page is shown with a Google URL starting with http://www.google.com/gwt/…. The special Google robot that visits your page uses Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google Wireless Transcoder;) as user agent, but it does not pass any information about the query entered by the visitor.
February 19th, 2007 at 3:04 pm
Hi Jean-Luc, you’re right about the link to a reformatted page that looks like this in the search results:
http://www.google.com/gwt/n?mrestrict=xhtml&site=search&q=seo&source=m&…
There’s a query in the url, do you think it won’t be possible to get this information in AWstats?
If you do a search in google.com/xhtml and click on “mobile web”, the link isn’t reformated as there are only mobile friendly pages, so I think it should work in that case, don’t you think?
Thanks!
February 19th, 2007 at 3:34 pm
I see. I checked for “Mobile Web” results now. I would try this:
ExtraSectionCondition1=”REFERER,^http:\/\/www\.google\.com\/xhtml\/search\?.*q=.*$”
March 20th, 2007 at 6:28 pm
hi,
The extra section is not functionnal. this extra section need to activate a plug-in ?
March 20th, 2007 at 9:53 pm
Hi fred,
There is no need for a plugin. The problem was caused by WordPress replacing my " (quotation mark) by ” (right double quotation mark)… 🙁
I have found a work-around and I just updated the extra section accordingly.
March 21st, 2007 at 2:47 pm
ok, thank you.
i test it now. but i wait for google visitor on my site.
June 2nd, 2007 at 8:49 pm
For those looking for the original version of this page, it is still cached by Alexa as we created it in the beginning of 2006. 🙂
November 8th, 2007 at 8:35 pm
Hi Jean-Luc
I’m trying to use your solution but it’s not working
IT appears on awstats.pl page but the records just not appear
It returns like no records exist
But, exist!
What this could be ?
November 9th, 2007 at 8:57 am
I see the three extra sections in your AWStats report at genius.org.br and they are not empty. What do you mean with “no records exist” ?
March 12th, 2008 at 10:20 am
Thanks for tips
I want to emphasize on one thing.
Now days 3 major Search engines like Google, Yahoo show the extra search phrases at the bottom of search page.This is a new innovation and we have to trace keywords from suggested key phrases.This is good news for seo community.
Cheers..
April 24th, 2008 at 11:28 pm
Great job internetofficer guys!
June 16th, 2008 at 6:16 am
Thanks for the very useful information.
Webshop owners and sellers can easily add another section, which includes Google Base queries:
Just alter the condition
ExtraSectionCondition1=”REFERER,^http:\/\/www\.google\.[^/]+\/search\?.*q=.*$”
to
ExtraSectionCondition1=”REFERER,^http:\/\/www\.google\.[^/]+\/products\?.*q=.*$”
July 5th, 2008 at 7:06 pm
Hello Jean-Luc
thanks for your mod.
Is it possible also get results in this way?
http://www.google.com/search?hl=en&q=video+musicali
Many thanks
July 7th, 2008 at 1:58 pm
Try this:
ExtraSectionFirstColumnValues1="REFERER,^(.*)$"
Not sure the report will be easy to read though.
July 23rd, 2008 at 12:22 pm
Great job internetofficer guys!
June 4th, 2009 at 8:06 pm
Bing support added in extra section 3. Bing is the new Microsoft search engine that replaces Live.com.