Site Search allows you to track how people use your website’s internal search engine. You can see:
This page will walk you through the Site Search setup, how to track Keywords on your internal search engine, and which reports Piwik offers.
To get started with Site Search tracking, login as the Super User or an Admin user and go to Settings > Websites. Here, you can enable or disable Site Search tracking for each of your websites.
Here is what the admin UI looks like for a particular website:
All Site Search reports are available under the main menu Actions > Site Search.
The easiest way to track internal search keywords, is to specify the URL parameter name that will contain the search keyword. By default, Piwik will read the URL and look for a parameter with any of the following names: q, query, s, search, searchword, k, keyword
The Super User can also specify the parameter names to use by default for all websites. Login as Super User, go to Settings > Websites, and look at the Site Search configuration at the bottom of the page.
If tracking search results via the URL is not possible (for example if you use rewritten URL without query parameters, eg. /search/keyword) , or if you wish to also track the count of Search Results, you may use the Javascript function piwikTracker.trackSiteSearch(keyword, category, searchCount). Calling the function will record the search keyword, search category, and the count of results on the search result page. This can be used on Search Results pages, instead of calling piwikTracker.trackPageView().
Check out more information in the Javascript documentation for trackSiteSearch()
Advanced users can also record Site Search requests using the Piwik Tracking API. See more information in the Tracking API Reference page. Specifically, look for the parameters ‘search’, ‘search_cat’ and ‘search_count’.
Would you like to benefit from the report “No Result Keywords”, listing all keywords that didn’t return any search result?
If you are using the “Track Site Search using URL Parameters (default)” setup, the only way to track the number of search results on the page is to edit the Javascript code, in the search result pages, to tell Piwik how many results are displayed. Once you have this number available in a Javascript variable, you can write:
[...] var searchCount = 15; // set this value when rendering the search result page _paq.push(['setCustomUrl', document.URL + '&search_count=' + searchCount]); _paq.push(['trackPageView']); [...]
Piwik will then track for the site search query, the number of results, and will report all keywords with “zero” results in the “No Result Keywords” report.
Piwik will report the Top Internal Searches:
You will also find the “Pages Following a Site Search” report, which displays the pages which are most searched for and clicked on in your search engine:
The Visitor Log & Real Time Widget will show the searches done by each visitor. In the example below, the visitor went to the Piwik.org homepage, searched for “javascript”, then “no script”, visited four pages, searched for “cookie”, visited one page, and finally searched for “server side”. Piwik lets you see in detail how visitors are using your websites and when during their visit they have executed a search:
The Visitors > Overview report will also show the number of searches and unique keywords:
The useful Transitions report will also show when Internal Search Keywords were used to reach the page being visualized. For example, in the screenshot below, you can see that there were five Internal Searches (on the left) that lead to the “/changelog” page (in the middle box). The searches were “changelog”, “add site”, “grouping” and “change servers”.
It is useful to know which keywords visitors search for to find a particular page. If, for example, you notice many people search for a particular page, perhaps that page is more important than you realize and could be showcased more clearly.
Tracking how people search your website is an easy way to find out exactly what your visitors want from you and your website.
Happy Site Search Analytics with Piwik!
Feedback on this page
Have you found an error in this page, or do you think some information is missing or not clear? We appreciate you taking the time to send us your suggestions and feedback on this page.