> For the complete documentation index, see [llms.txt](https://documentation.ajaxsearchpro.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.ajaxsearchpro.com/analytics-integration/site-search-tracking.md).

# Site Search Tracking

Site search tracking is a google analytics feature, where you can track the search requests on your site separately from pageviews.

To fully understand how site search tracking works, please read [this official article from google](https://support.google.com/analytics/answer/1012264?hl=en\&ref_topic=1031951).

## Step 1: Setup a correct pageview string

On the **Analytics Integration** plugin subm-menu page, change the `Google Analytics Pageview string` option to this format:

```
?ajax_search={asp_term}
```

.. like so:

![](/files/eWZE3yuPPZmdjNEQc2Sd)

The value between the question mark "?" and the "=" is going to be the query variable, so in this case the "*ajax\_search*" string.

You can replace the "*ajax\_search*" variable name with anything you want, just make sure to remember it.

## Step 2: Setup Google Analytics to track search

Log-in to your Google Analytics account, select the correct account, property and view.

On the **Admin** section, click on the **View Settings** Option:

![](http://i.imgur.com/ZgHxOpI.png)

Scroll down to the **Site search Tracking** option, and turn it on, and to the **Query parameter** option enter the "ajax\_search" or the query variable you have choosen before:

![](http://i.imgur.com/P2V6sCR.png)

Save the options, and it's done!

## Step 3: Check the reports

After a couple of hours the new search phrases should start to appear in the Site Search report.

![](http://i.imgur.com/dE4UoGU.png)
