Setting up Google Analytics Site Search
Written by Benjamin Mangold
Step 1Perform a search on your website and look at the URL.
In this example a search for 'analytics' has been performed.

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.

Step 3
Click 'Edit' for your Main Website Profile Information.

Step 4
Select 'Do Track Site Search'.

Step 5
Enter the Query Parameter from your internal search.

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

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

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: Google Analytics, new Google Analytics features, site search



11 Comments:
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?
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.
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
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.
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!
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?
very good question! I'd like to know that too :)
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...
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.
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!
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!
Post a Comment
Links to this post:
Create a Link