Search code examples
analyticsmatomo

How to track searches in piwik?


The site I'm building has a jquery based search input that hides or shows elements that match whatever you type in: http://pieline.net/

There's no submit button - results are displayed in real time. Is there any way to track what users are typing into this box? Something to do with custom variables maybe? Thanks


Solution

  • This is what we do on Piwik's developer site to track searches:

    _paq.push(['trackSiteSearch', 'here is the search query', false, false]);
    

    This is pretty straightforward, have a look at the "Internal search tracking" documentation too.