# 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:

![](https://1706764988-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L9jkFgNo4lpUof35gvS%2Fuploads%2FyI8QX4cOaKmLroWDdpOR%2Fimage.png?alt=media\&token=8bc950e8-762f-4ff2-a820-22861e7d0881)

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)
