WP Search Keywords Statistic wrong

i have installed the current Version of Wordpress, Piwik and the Piwik-Plugin.

If i take a look at the Search Statistic the i get a lot of wrong “without Results” entrys. But if take a look for these Searchwords i find them ?

Any hints? Is this an Piwik-Related Issue or related to the Plugin?

please setup search count tracking in internal site search: Site Search Tracking and Reporting - Analytics Platform - Matomo

i had tried this … but … doesnt work :frowning:

Here is my Code … maybe any ideas (i hope)


<script type="text/javascript">
	var _paq = _paq || [];
	_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
	_paq.push(["setCookieDomain", "*.mysite"]);
	_paq.push(["trackPageView"]);
	_paq.push(["enableLinkTracking"]);

	var searchCount = 15; // set this value when rendering the search result page
	_paq.push(['setCustomUrl', document.URL + '?s=' + searchCount]);
	(function() {
		var u=(("https:" == document.location.protocol) ? "https" : "http") + "://mysite/tools/stats/";
		_paq.push(["setTrackerUrl", u+"piwik.php"]);
		_paq.push(["setSiteId", "2"]);
		var d=document, g=d.createElement("script"), s=d.getElementsByTagName("script")[0]; g.type="text/javascript";
		g.defer=true; g.async=true; g.src=u+"piwik.js"; s.parentNode.insertBefore(g,s);
	})();
</script>
<!-- End Piwik Code -->

see the doc at JavaScript Tracking Client: API Reference - Matomo Analytics (formerly Piwik Analytics) - Developer Docs - v3