Google Analytics Site Search: Setup Options

There are a number of ways to setup Google Analytics Site Search depending on the way your website functions and the URLs your search function creates.

Site Search: Option 1

Perform a search for 'analytics' on your website and look at the URL.

What do your Site Search URLs look like?

If the resulting URL looks like one of the following:

http://www.example.com/search?q=analytics
http://www.example.com/index.php?id=search&term=analytics
http://www.example.com/search.asp?search_term=analytics&id=ac9024

You can follow our steps to setup Google Analytics Site Search.

Site Search: Option 2

If the resulting URL looks like one of the following:

http://www.example.com/index/search/analytics
http://www.example.com/search.php/keyword/analytics/id946
http://www.example.com/searchterm/analytics

Because Site Search reports are processed before filters are processed you cannot simply create a filter to modify your Site Search URL within Google Analytics. Instead you need to modify the tracking code on the search results page to dynamically pass the search term using a virtual pageview (see 'option 3 below').

If you or your web developer is unable to modify the tracking code on the search results page, then you might want to consider one of the following filters to at least make the Top Content report easier to scan for internal search terms. Remember, that this does not allow you to use the Site Search reports within Google Analytics.

Possible filters:

If your URL looks like http://www.example.com/index/search/analytics you will need to setup the following filter:

Google Analytics Site Search

Field A -> Extract A: Request URI: ^/index/search/(.*)
Output To -> Constructor: Request URI: /search?q=$A1

If your URL looks like http://www.example.com/search.php/keyword/analytics/id946 you will need to setup the following filter:

Google Analytics Site Search

Field A -> Extract A: Request URI: ^/search.php/keyword/(.*)/id
Output To -> Constructor: Request URI: /search?q=$A1

If your URL looks like http://www.example.com/searchterm/analytics you will need to setup the following filter:

Google Analytics Site Search

Field A -> Extract A: Request URI: ^/searchterm/(.*)
Output To -> Constructor: Request URI: /search?q=$A1

These filters will modify your Top Content reports:

Google Analytics Site Search Report

But won't allow you to use Site Search reports:

Google Analytics Site Search Report

Site Search: Option 3

If the resulting URL does not contain the keyword you searched for then you will either need to modify your search form or modify your Google Analytics Tracking Code to create a virtual pageview.

For example you search for 'analytics' and the URL of your search results page looks like:

http://www.example.com/search
http://www.example.com/index.php?id=search
http://www.example.com/search-results.asp

View the source of a page on your site that contains the search input, if your form looks something like this:
<form name="gs" method="post" action="search.php">
Then try changing the method to 'get'. Your source code should look something like this:
<form name="gs" method="get" action="search.php">
If you now perform a search you should see a URL along the lines of those in 'Option 1'.

If you are unable to modify the form method or the change does not provide the search parameter in the URL then you will need to modify the Google Analytics Tracking Code to dynamically create a URL that is correctly structured for Site Search.

For example:
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-123456-1");
pageTracker._trackPageview('/search?q=analytics');
} catch(err) {}</script>
The keyword ('analytics' in the example above) will need to be dynamically passed to the tracking code for each term that is searched. Talk to your web developer if you need help achieving this, you can then look at 'Option 1' because you are creating a virtual pageview for http://www.your-site.com/search?q=analytics

Goal Abandonment Rate in Google Analytics Explained

So what is Goal Abandonment Rate in Google Analytics? And what do those numbers mean anyway?

abandonment rate report in google analytics

The Goal Abandonment Rate report allows you to see what percent of people have commenced your defined conversion process, but have failed to convert on the goal. But how are those numbers calculated?

Total Percent of Goal Abandonment

total abandonment rate in google analytics

The total percent is calculated as follows (for the currently selected time period):

[ ( Unique Goal Starts - Goal Completions ) / Unique Goal Starts ] X 100 = Total Goal Abandonment Rate

Percent of Goal Abandonment by Day

daily goal abandonment in Google Analytics

Starting from the right, the (68.75%) uses the same method of calculation, but each row is calculated by day. For example;

[ ( Day Unique Goal Starts - Day Goal Completions ) / Day Unique Goal Starts ] X 100 = Day Goal Abandonment Rate

Moving to the right, the 97.50% is a comparison of each days abandonment rate to the overall abandonment rate for the selected time period, calculated as follows;

[ Day Goal Abandonment Rate / Total Goal Abandonment Rate ] X 100 = Comparison Goal Abandonment Rate

Related Posts Plugin for WordPress, Blogger...