ElasticPress
ElasticPress copied to clipboard
BUG: Autosuggest Results Unresponsive with Google Analytics Tracking Enabled and Script Blockers Active
Describe the bug
Description
When Google Analytics tracking is enabled on a site using ElasticPress Autosuggest, the autosuggest functionality becomes unresponsive if script or tracking blockers are used in the browser. Clicking on autosuggest results fails, accompanied by a JavaScript TypeError in the console.
Expected Behavior
Autosuggest results should be clickable, and clicking on a result should navigate to the relevant content.
Actual Behavior
Clicks on autosuggest results do not respond. An error is logged in the browser's console.
Steps to Reproduce
- Visit https://demo.elasticpress.io/ using a browser with script blocking enabled (e.g., Brave's script blocker or the uBlock Origin extension).
- Enable tracking/script blocking features.
- Attempt to use the autosuggest feature by typing a search term in the search bar.
- Click on any of the autosuggest results.
Screenshots, screen recording, code snippet
No response
Environment information
- Browser: Google Chrome
- Tracking Scripts blocked by NextDNS.io
WordPress and ElasticPress information
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct