I am trying to get Google Analytics Site Search to work but our search is #-based and not ?-based, meaning the parameters are not being picked up.
I want to intercept the url sent to GA and replacing the # with ?, but I am surprised to see that our AJAX calls are already going to GA on every search. Where is this behaviour coming from – does GA automatically bind to AjaxComplete by default? How could I pull off my intercept then?
The other approach is to use the search and replace filter in Google Analytics.
jQuery address is rewriting the url
/Search#reg=termto/Search/reg=termWe use the search string
^\/Search\/with a replacement string as/Search?