WP-Matomo
WP-Matomo copied to clipboard
Should search call both trackPageView and trackSiteSearch?
We run a white label Matomo (self hosted) site and use this plugin to connect to it but Im wondering if search page tracking isn’t implemented wrong?
When visiting a search page I can see the following tracker code:
var _paq = window._paq = window._paq || [];
/* tracker methods like “setCustomDimension” should be called before “trackPageView” */
_paq.push(['trackSiteSearch','keyword', false, 1]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
But according to the integration guide here: https://developer.matomo.org/guides/tracking-javascript-guide
Matomo says:
We recommend not to call trackPageView() on the Site Search Result page
Whenever a search is performed (when activating search tracking) two events are created. A call to tracker.php?search=$keyword
and one to tracker.php?action_name=Search
.
Is this a bug or a feature somehow? Won't this cause double search hits?