Setting up Google Analytics Site Search

Written by Benjamin Mangold

Step 1

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

In this example a search for 'analytics' has been performed.

Google Analytics Site Search

This example shows a search for 'analytics', the resulting URL is http://www.example.com/search?q=analytics. Note that the Query Parameter is 'q'.

(Please note that your website's internal search may return a much longer URL, for example http://www.example.com/search.asp?site=example&area=products&term=analytics. Note that the Query Parameter is 'term'.)

Step 2

Log into Google Analytics and click 'Edit' on next to the website profile.

Google Analytics Site Search

Step 3

Click 'Edit' for your Main Website Profile Information.

Google Analytics Site Search

Step 4

Select 'Do Track Site Search'.

Google Analytics Site Search

Step 5

Enter the Query Parameter from your internal search.

Google Analytics Site Search

Selecting 'Yes, strip query parameters out of URL' will prevent your search from showing up in your Content reports, for example:

Google Analytics Site Search

Selecting 'No, do not strip query parameters out of URL' will include your search results in your Content reports, for example:

Google Analytics Site Search

Site Search also allows you to setup categories. This can be used if your internal search has the ability to segment results across different areas of your website. To setup categories you will need to know the parameter that returns results for the different areas of your website. For example if you are using a Google Mini or Google Search Appliance the Category Parameter would be 'site' on a default configuration.

If your search does not have categories do not enter a Category Parameter.

Labels: , ,

Share

Posted on Wednesday, November 14, 2007

11 Comments:

Blogger dauclair said...

Nice! Thanks for the walk through.

So, if my query string is: ?q=searchterm&c=category

I will add a q in the Query Parameter field and c in the Category Parameter?

May 24, 2008 6:29 AM  
Blogger Benjamin Mangold said...

Hi dauclair,

Exactly!

Thanks for commenting. You should begin to see data within the Site Search reports within 6 to 12 hours.

If you have any problems let me know.

May 25, 2008 11:11 AM  
Blogger dauclair said...

That worked out great! I would have liked to had turned this on since the beginning, that is some great data to have! Worked great, I am using OrcaSearch as my site search script. What do you use?

Thanks!
Daryl

May 28, 2008 6:50 AM  
Blogger Benjamin Mangold said...

We generally provide clients with site search using Google Mini Search Appliances. It is an excellent search solution, although for smaller sites it is probably out of reach. You should checkout Google Custom Search (http://www.google.com/sitesearch/), although the free version does include advertising and it is totally reliant on Google indexed content.

May 28, 2008 9:14 AM  
Anonymous Deepti Srivastav said...

Thanks Benjamin,
I was setup it before but was not works, your step by step guidelines are help me lot implement site search today. I will let you know the result! Thanks Again!

November 13, 2008 10:46 PM  
Blogger Mark Anderson said...

Great post! I'm curious as to how this works with a URL rewrite.

For example, on my site the non-rewritten URL is http://www.andertoons.com/index.php?cmd=search/cats, but you see http://www.andertoons.com/search/cats in the address bar.

Do I enter "cmd=search" in my query parameter field?

January 20, 2009 7:15 AM  
Blogger R said...

very good question! I'd like to know that too :)

February 8, 2009 8:03 AM  
Anonymous Anonymous said...

ah... you have to wait for results to be recorded. I'd have thought they could go back through your stats and create historical data once you'd activated this...

March 11, 2009 1:47 PM  
Anonymous analogstuff said...

I have been trying to find this information for quite a bit of time but i could not get the exact information what i needed now.
I have implemented tracking adsense for search now in my google analytics account. Thanks for sharing valuable information.

March 24, 2009 12:40 AM  
Blogger Marko said...

Hi,
I have problems setting site search on my website.

If I search "something" the url result will be:
/index/find/name/something/keyrif/0/desc/0/type/all

If I search"site search" result is:
/index/find/name/site+search/keyrif/0/desc/0/type/all

In google I put "find" but doesn't work. Please help!

May 20, 2009 8:36 AM  
Blogger Benjamin Mangold said...

I am going to write a post to answer Mark and Marko's questions about using Google Analytics Site Search where there is no URL query parameter.

There are a number of workarounds to get Google Analytics Site Search working in these scenarios.

Stay tuned! And thank you for the questions and feedback!

May 20, 2009 9:59 AM  

Post a Comment

Links to this post:

Create a Link

Mangold Sengers provides Google Analytics consulting, Google Analytics onsite training and Google Analytics online training. Contact us to discuss your needs.