Piwik advanced features question

We are looking at various analytics packages for use in our ecommerce application.

We have evaluated the basic features of Piwik and have shortlisted it but we would like to know if any of these specific usecases are fulfilled by Piwik or can be met by writing a plugin.

  1. A user searches for a query and gets a result page. He does not select any result. Fires another query and gets another result page and so on until a particular result is selected. Can we track, on an average, how many queries did the user have to make until a result was selected ? Which were the queries which failed to provide relevant results for the user ?

  2. Mouse trails or heatmaps


See this page for the latest list of features: List of Features in Piwik Analytics - Analytics Platform - Matomo