Site Search allows you to track how people use your website’s internal search engine. You can see:
- What search keywords visitors used on your website’s internal search.
- Which of those keywords resulted in no results (and thus what content your visitors are looking for but cannot find).
- What pages visitors visited immediately after a search.
- What search categories visitors use (if your website employs search categories).
This page will walk you through the Site Search setup, how to track Keywords on your internal search engine, and which reports Matomo (Piwik) offers.
Enable Site Search Tracking for your Website
To get started with Site Search tracking, login as the Super User or an Admin user and go to Administration > 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.
Tracking Site Search Keywords
Track Site Search using URL Parameters (default)
The easiest way to track internal search keywords, is to specify the URL parameter name that will contain the search keyword. By default, Matomo (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 Administration > Websites, and look at the Site Search configuration at the bottom of the page.
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().
Track Site Search using the Tracking API (advanced users only)
Advanced users can also record Site Search requests using the Matomo (Piwik) Tracking API. See more information in the Tracking API Reference page. Specifically, look for the parameters ‘search’, ‘search_cat’ and ‘search_count’.
Tracking No Result Search Keywords
Would you like to benefit from the report “No Result Keywords”, listing all keywords that didn’t return any search result?
[...] var searchCount = 15; // set this value when rendering the search result page _paq.push(['setCustomUrl', document.URL + '&search_count=' + searchCount]); _paq.push(['trackPageView']); [...]
Matomo (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.
Site Search Analytics Reports
Matomo (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:
View the Detailed Searches for each Visitor
Number of searches and keywords over time
The Visitors > Overview report will also show the number of searches and unique keywords:
Understand How Site Search is Used to Find other Pages on your Site
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 Matomo (Piwik)!