ElasticPress icon indicating copy to clipboard operation
ElasticPress copied to clipboard

BUG: Autosuggest Results Unresponsive with Google Analytics Tracking Enabled and Script Blockers Active

Open anjulahettige opened this issue 1 year ago • 0 comments

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

  1. Visit https://demo.elasticpress.io/ using a browser with script blocking enabled (e.g., Brave's script blocker or the uBlock Origin extension).
  2. Enable tracking/script blocking features.
  3. Attempt to use the autosuggest feature by typing a search term in the search bar.
  4. 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

anjulahettige avatar Jun 03 '24 10:06 anjulahettige