How to configure site search to report keyword tracking in Google Analytics


Internal site search  (i.e. searching for “running shoes” on Nike.com) is an extremely powerful tool that improves conversion rates by helping your site visitors find products on your site. On average, visitors who search on your site will convert at significantly higher rates than those who use only hardlinked site navigation.



Site Search Tool-set Features
There are several Site Search vendors. If your website doesn't come with a standard built-in site search option, we recommend a service like Swiftype or Solr which are available as a SaaS monthly option. Google also provides a paid site search tool.

Regardless of the system you select, you should make sure that (1) implementation is as simple as adding pre-packaged javascript on you pages, (2) you can control the results ranking, through weighing certain products or key terms, (3) that there is an auto-complete option with spellcheck and that (4) the system can handle standard synonyms.

Internal site searchAdding Site Search Capabilities

Most Content Management Systems (CMS) such as Wordpress, Shopify, Miva, Volution, Magento, etc. have built-in or add-on site search components. For most CMS platforms the output of site search is the same -- a results page, that is controlled by URL Query Strings, utilizing a consistent format that pivots off of the parameter “q” and separates search terms by using the “+” symbol such as in the example for our fictitious site www.myecommwebsite.com where we searched for the keyword “amazing widgets”.

Adding Site Search Capabilities

Tracking Site Search Behavior

Optimizing your site search implementation is one of the easiest ways to increase your conversion rate and grow revenue from existing traffic. The only way to do this is by having a complete view into your site search performance, especially which keywords visitors searched for; the page they were on when they searched; and what did they do after the results page.


Tracking site search in Google Analytics

Tracking site search in Google Analytics is very easy and will not require IT / Developer help, but you will need Admin permissions for your Google Analytics account.

STEP 1: Log into GA and navigate to the “Admin” Panel and select "View Settings."
Make sure you have the proper Account and Property selected from the first and second drop downs. Site search is configured through the “View” Panel (the drop down on the far right). Make sure you have the correct View selected. Then click “View Settings”.


Tracking site search in Google Analytics

STEP 2: Turn on site search tracking.
Now that you have clicked into Report View Settings scroll all the way to the bottom and click “ON” Site Search Tracking.

Site Search Tracking.
STEP 3: Configure the query parameter.
Once you click the slider to “ON” you will need to specify the query parameter your site utilizes to distinguish internal site search. These parameters will be in the URL. In the example we mentioned the query string parameter was “q” but it can be any number of parameters: “s” or “term” or “search” etc…


Note: If your eComm website has Site Search but does not utilize URL query strings, this integration guide will not work. You can still track Site Search but not through GA’s built in reports, rather you will have to utilize Custom Event tracking.


You can identify the query string by looking in the URL. The site search parameter follows the “?” question mark and will have an “=” sign after it, such as in our example: ?q=amazing+widgets

URL query strings

Google Analytics site search tracking can support up to 5 separate URL Query string characters. If your site uses multiple query strings for site search, enter each one in the “Query Parameter” field, separated by “,” commas. Do not click strip query parameters out of the URL as sometimes it is very useful to search all your site URLs for keywords, especially if there is an error that is causing malformed Query String parameters.



STEP 4: If applicable, add Site Search Categories


Some sites also use Site Search Categories to refine internal site search. Categories can be as simple as searching by image vs price, or as involved as selecting a product type from multiple options. If your site doesn’t utilize Site Search Categories you can now click "Save" and complete the integration.

If your site utilizes Site Search Categories, then you will need to configure these as well. These internal search refinements will also pass query strings into the results page URL. Switch Site Search Categories to “ON”.

Sctn7-e.png

The site search categories URL query string parameter functions in the same way as regular site search. Using our previous example imagine we have a refinement category called “thingamajig.” The query string would be: ?q=amazing+widgets&restrict_sr=thingamajig

URL query string parameter functions

Internal site search categories will be separated by “&” ampersands in the URL. Site search categories can handle up to 5 separate parameters, these will have to be entered in the “Category parameter” field and separated by “,” commas.
You can now click “Save”.

You have just configured Google Analytics to track site search performance! GA will track the keywords your visitors search for on your site, the page they were on when they conducted a search, and if that search ever resulted in a purchase. This simple but critical integration will lead to a treasure trove of optimization opportunities.  

 

Need more help setting this up? Here's some recommended resources or service providers



Need help setting up your eCommerce Analytics? We'll walk you through it! Schedule a free half hour appointment.






Clickvoyant Web Developer

Get our free Google Analytics eCommerce Roadmap to help understand your web traffic data and make data driven decisions on both site enhancements and marketing channel optimization.