How To Set Up The New GA Site Search
Yesterday, GA made one of their new features, Site Search analysis, available to everyone with a GA account. I started to set it up for my customers, and realized that I didn’t know what choices to make. (They give you choices, but don’t tell you the implications.)
So I did some testing, and here is what I found.
First, you’ll find the abilities to set up Search under the edit Profile settings:
Click the Edit and you’ll get this search setup:
Look to the bottom of the page to find it — most of the options will only appear after you click on the “Do Track Site Search” radio button.
Now, you have to find your query parameters. Go to your website and do a search. Look up into the URL address bar, find where your search term is, and what query parameter goes with it. For example, you might have typed in gifts — and your search term might look like this in the url: &word= gifts. Or maybe it looks like this, &search=gifts. In the first case, your query param is word, and in the second, it is search. No matter, just put that value into the Query Parameter (required) box.
But what if you have two on site searches? For example, our site has a regular search and a blog search. In that case, you can put your query parameters in with a comma, like this: word,search. However, the new search doesn’t seem to know how to separate them. You’ll get all the search terms from both, but they’ll be in one long list. You can disaggregate them yourself by working with the Start Pages Report (see it on the left, under the Site Search, which you can find in the Content Reports.) Or your can set up a new profile for the second search.
Now you have to decide, should you strip your query parameters out of GA?I did two profiles last night, one with and one without query params stripped out. I found that stripping out the query parameters here is like stripping them out in the Main Profile Settings (go look at that top screen shot in this post – see how you have the chance to Exclude Query Parameters?) This does a few things for you:
- It aggregates all your URIs (so that you don’t have to look at a million pageviews)
- It thereby reduces the number of unique pageviews (because www.mysite.com?search=Robbin is a different pageview from www.mysite.com?search=LunaMetrics). This makes it less likely that you will go over GA’s pageview limit and just get the dreaded (other) in your top content
- It enables you to take the query parameters out here without messing up your search. This is golden! One of the problems we always encounter is deleting query parameters and breaking our analytics. This is usually about breaking our goals, if, say, one goal is only distinguished from another with a query parameter. By taking them out here, you still achieve the first two points, above, without breaking your searchalytics.
Ok, now you are done with search terms, but not with all the other junk in your search uri. Maybe that’s all you have (for example, our wordpress search just has a search term in it), but you often will have lots of other stuff. The site I did the testing on had a little search box, and below it, allowed you to search by drop down topic, by country, and by kind of material (book, white paper, etc.) Each of those is a category. First, I did a few pretend searches to find out how those things show up in the URI. Then, I used the bottom half of the new search setup, where it asks, Do you use categories for site search? I changed the radio button to YES, and then entered each one, followed by a comma. Again, I stripped out my parameters. (I compared the two profiles that I set up, and noticed that, as would be expected, only the parameters I specified got stripped out.) Again, I noticed that GA doesn’t disaggregate the categories, so if they all come through as a number (the way mine did), you have to create a system (three digit number from one kind of category, two digit numbers from another), put them in different profiles, or perhaps the easiest, just use a filter to rewrite them. And then you’ll know what category they came from.
Before you are done, go on over to Justin’s blog, and read about Search Implementation. He talks about two interesting topics, how to do the search when you don’t have a query parameter, and what to do when you have multiple searches that are really the same thing, such as misspellings.