As I understand Google analytics require an url with something like &s=mysearchterm
This implied to have to use a form witth a get method. This is not the method supported by AS.
If you would like hack the code to modify this behavoiur try to do as follow. With AS1.8.4 code, replace "AS_search" by "search" in the lines:
assets\snippets\ajaxSearch\classes\ajaxSearch.class.inc.php
Line 375: if ( isset($_POST['search']) || isset($_GET['AS_search']) || isset($_GET['FSF_search'])) {
Line 380: } elseif (isset($_GET['AS_search'])) {
Line 381: $this->searchString = urldecode($_GET['AS_search']);
Line 551: if (!isset($this->subSearch)) $varLink['pagingLink'] = $modx->makeUrl($modx->documentIdentifier,'','AS_offset='.$nrp.'&AS_search='.urlencode($this->searchString).'&advsearch='.urlencode($this->advSearch));
Line 552: else $varLink['pagingLink'] = $modx->makeUrl($modx->documentIdentifier,'','AS_offset='.$nrp.'&AS_search='.urlencode($this->searchString).'&advsearch='.urlencode($this->advSearch).'&subsearch='.urlencode($this->subSearch));
And then in
assets\snippets\ajaxSearch184\classes\ajaxSearchPopup.class.inc.php
Line 401: $this->varResults['moreLink'] = 'index.php?id='.$this->cfg['moreResultsPage'].'&AS_search='.urlencode($this->searchString).'&advsearch='.urlencode($this->advSearch).'&subsearch='.urlencode($this->cfg['subSearch']);
Line 403: $this->varResults['moreLink'] = 'index.php?id='.$this->cfg['moreResultsPage'].'&AS_search='.urlencode($this->searchString).'&advsearch='.urlencode($this->advSearch);
and in the original layout template, replace method="post" by method="get":
<form [+as.formId+] action="[+as.formAction+]" method="get">
I haven’ tested this hack and analysed the impacts and I don’t support this solution (for the moment), but let me know the results
I am also interested to know if used AS with google analytics is a feature request for lot of people