Using Site Search Features in Creative Ways

Tuesday, April 14, 2009 | 10:50 AM

Labels: ,

The Google Analytics Site Search feature is a powerful tool for analyzing visitor interest and behavior on your website, but that's not all it is good for. Using Site Search in some creative ways can leverage this tool for advanced multi-dimensional analysis equivalent to being able to set multiple, simultaneous user-defined segments.

What is Site Search in Google Analytics?

The Site Search reports in Google Analytics are designed to provide a means to analyze how visitors search the content on your site if you have a site search tool, whether it be one from Google itself such as Google Site Search or a Google Mini Search Appliance, a site search tool built into your website's Content Management System, or of of the myriads of other site-search tools available today.

These reports compile information about how many of your visitors use site search, what they search for, what page they start searching from, what pages they click to after searching, and more. Moreover, the reports can track as many searches per visit as are conducted. As with most other dimensions in Google Analytics, site search dimensions can be used in Advanced Segments and Custom reports to create an extremely powerful analysis engine.

How does Site Search work?

Site Search in Google Analytics is based on identifying pre-defined query values and category identifiers from the Request URI. The parameters can be anything - simply define them in the appropriate field in the profile configuration screen within your Google Analytics account. In the screenshot below you can see that Site Search has been enabled and is looking for several potential query parameters and category identifiers.

Thus, if Google Analytics received a pageview to a Request URI of "" and the settings above were active for the profile, the Site Search reports would record the following:
  1. A visit used site search
  2. The search term "email tracking" was used once
  3. This search was conducted in the "support" category

Another key feature about Site Search is the "search term refinement" report. This report shows a drill-down of searches performed after the term in question was searched. This is an incredibly important feature because it allows analysis of progression and relationship from one independent variable (search term) to another.

Looks like someone was a bit hungry when thinking about email marketing...

Where the "creative" uses begin

This is where the fun really gets started. Since Site Search is based on contents of a reported Request URI, we can pass anything we want into the Site Search reports. Consider what we already know about how Site Search works:
  • Site Search has two independent dimensions: category and keyword or term
  • If multiple searches are performed during the same visit they will all be recorded under the Search Terms report and can be related by way of the Refinements report
  • Any Request URI that contains a query string matching the defined parameters for search term and category will trigger a "site search" to be recorded
Thus, if we setup Site Search to capture meaningful data via the Request URI that wasn't site search but was still useful and relevant to analysis, the possibilities are endless!

Creative use in action: unlimited User-Defined segments

If you've been using Google Analytics for a while you may well have run into the fact that, currently, only one user-defined segmentation cookie value can be set at any given time. There are plenty of "alternative methods" to try and work around this reality one way or another. And note: this should not be confused with the recently released Advanced Custom Segments tool which is extremely powerful and can be used to create any number of custom segments. The user-defined and advanced segments features work as they are designed: however this method provides an additional way by which you can further extend your use of Google Analytics.

The Scenario

Let's say that you want to classify your visits by expressed industry and product interest based on the input of a form. Using standard user-defined segmentation would not work for this as it would only support industry or product interest. However with creative Site Search analysis, an unlimited number of "industry" and "product" interests can both be tracked for each session. A practical use of this would be tracking responses on a lead generation or sign-up form that had check boxes or select options for "Industry" and "Product".

How to make it happen:
  1. In the example above (tracking fields in a form to create Site Search segments) you'll need to generate a virtual pageview with a defined Request URI syntax. For this example use:

    pageTracker._trackPageview('/custom/lead-form/segment.html?segcat=[segment type]&segterm=[segment value]')

    Where "segcat" is the identifier for a Site Search "category", "segterm" is the identifier for the Site Search "term", "[segment type] is either "industry" or "product", and "[segment value]" changes depending on the form field value.

  2. For each industry and product field option on the form, create an "onclick" element that calls the pageTracker script with the corresponding values for "segment type" and "segment value" defined for that field.

  3. The result will be a "pageview" hit each time a visitor selects a form option. Let's say you have 5 industries available and 10 products of potential interest, the resulting data would show which industries are most commonly selected and in what order, as well as which products are most desired, and how the products relate to each other via the Refinements report.

Why not use use Event Tracking for this?

It's a worthwhile question and has some merit, however at the time of this writing, you still need to request access to the Event Tracking beta before you can use it. Furthermore, Event Tracking can't be used in Advanced Custom Segments or Custom reports at the time of writing, nor does it have the Refinements analysis options and the "start pages" and "exit pages" reporting.

What are other creative uses for Site Search?

The example here is just one way in which Site Search can be used for more than, well, site search analysis. For example, a few additional uses include:
  • Tracking Rich Internet Applications (RIA's) using this Site Search method rather than Event Tracking can provide some advantages,
  • Tracking store product interest when the Category and Product name are persistently available in the URI or a Virtual Pageview can reveal new product interest trends for online retailers,
  • And using Site Search in creative ways to measure Internal Ads and Cross-promotions will clear the mist on what promotions really drive sales on your site.

In Closing

Like many things, using something in a way other than what it was designed for can be a dangerous activity, but fortunately for us Web Analysts this method of creatively extending Site Search has a lot of upside and little downside. So, go out and give it a shot. It is highly advisable to experiment in a non-production environment first, and even in a live environment, use multiple trackers - one for normal pageviews and one for normal pageviews + site search segmentation pageviews.

And, to give credit where credit is due: props to Justin Cutroni from EpikOne for mentioning this concept to me when Site Search was first released, and Mike Plummer from POP for expanding the technique as a method for event and interaction tracking.

Posted by Caleb Whitmore of Analytics Pros, a Google Analytics Authorized Consultant.