General questions to the trackSiteSearch() method


I’m integrating Piwik into our one page JS web application using the the Piwik JS tracker library. Tracking of pages views works good, now I start to handle the app internal search. Therefore I found the trackSiteSearch method. But I’m a little bit confused about the usage or better to say about its options.

trackSiteSearch() has 3 parameters: keyword, category, count

  1. Is it possible to somehow pass more than one keyword and category? I don’t want Piwik to handle a query consisting of multiple words as one big keyword.

  2. Can we pass more than one category when tracking the search?

  3. We have a paged search result page. So we only show 20 results on one page. So when tracking the count, does Piwik expect, the number of search results shown on the page, or the total number of search results including the ones which would be shown when you navigate to the next result page. E.g. Searching for “Mike” returns 50 results in total, but we only show 10 on one page. Do I have to set the count to 10 or to 50? When there are less than 10 results (e.g. 4), do I set the count to 10 or 5?

Hope someone with experience in tracking internal search can help we with my questions.


  1. No
  2. No
  3. Piwik expects the “total result count”. This feature is only used to show the “No search result keyword”

Ah ok. Thanks for the answer.

Hi Matthiew,
Does answer #3 mean that it’s not possible to show the “total result count” as a value in the Site Search Keywords widget? How can I show the results count in the Site Search Keywords grid?