- Issue created by @pivica
- Status changed to Needs review
over 1 year ago 5:58pm 19 September 2023 - Open on Drupal.org →Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Waiting for branch to pass
When using a view with an ajax-enabled search, the trackSiteSearch event works correctly on the initial page load. However, subsequent ajax search actions on the same page are not tracked. This issue arises because the search tracking code is injected into the html_head, which does not function properly for ajax callbacks.
To reproduce this issue:
To address this problem, it is not feasible to rely on the current html_head approach. One solution is to:
This approach will ensure that tracking works seamlessly for both ajax and regular search page loads.
It's important to note that ViewsPostRenderHookHandler::process() requires some modifications in its method signature and code. Hopefully this method is used only inside of matomo module.
Needs review
1.0
Code