Matomo Site Search is not tracking any data

Hello Team,
We have Matomo 3.14.1 version running on the Production environment. Earlier we haven’t noticed “Site Search” was working or not. But after upgradation we come to know it’s not tracking any data. We went through some Matomo documents & tried to enable from UI as well as with Java Script, still not enabled properly. We are sharing screen shots as well.
Document referred :

Just included this script & enabled from UI as well.


When are you calling this?

Hello Lukas,
While integrating with confluence wiki page along with java script we have included this query.


To be more precise:
The basic idea idea is that on websites that are site search results you would in your tracking code not call trackPageView as always, but use trackSiteSearch instead and pass it the correct data on.

So did you modify your tracking code so that it handles your seach pages separatly

We have custom script as well, first we are trying to test with default script which is given by Matomo & modified script. Just we included that command & testing. If it works then we will change in custom script as well.
Script :

<!-- Matomo -->
<script type="text/javascript">
  var _paq = window._paq = window._paq || [];
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */

  (function() {
    var u="xxxxxxxxxx/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '2']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
<!-- End Matomo Code -->