When "Track search: Use Matomo's advanced Site Search Analytics feature" is selected, an extra/new WP_Query is ran to count the number of results and push them to Matomo. This can really slow down searches.
Using the already available global $wp_query object avoids having to run an extra query.
When "Track search: Use Matomo's advanced Site Search Analytics feature" is selected, an extra/new WP_Query is ran to count the number of results and push them to Matomo. This can really slow down searches.
Using the already available global $wp_query object avoids having to run an extra query.