Track Site Search using the Javascript trackSiteSearch() function

Hello,

I am trying to set up site search tracking using the Javascript trackSiteSearch() function.

My website is built on Drupal with a SolR internal search engine.

The URLs for the search are built like this : http://www.website.com/search/site/keyword1%20keyword2

I have read those 2 pages :
https://developer.piwik.org/guides/tracking-javascript-guide#internal-search-tracking
http://piwik.org/docs/site-search/#track-site-search-using-the-javascript-tracksitesearch-function

However, I still have questions about the parameters to set in the JS code.

I would like to replace : piwikTracker.trackPageView()
with : piwikTracker.trackSiteSearch(keyword, category, searchCount)
on my search page.

I understand I’m supposed to replace “keyword”, “category” and “searchCount” by the parameters relevant to my website. But how do I figure these parameters out?

Thanks a million for any help.

Hi - Did you ever figure this out? I am trying to do the same thing.

Thanks!