Matomo can find search terms (from the internal search), but by default looks for parameters like q or query which XWiki uses text. Also the number of search results needs to be explicitly passed to Matomo, as ti cannot guess them from the request.