Using the new site search feature in Google Analytics

Note: I hope you will find this information useful, but it is not intended to be a step by step guide. The way you might implement this on your store could be different and you will need RTML and CSS knowledge. Please don’t attempt unless you are comfortable with this. Also, the steps in here are for those of you using the standard site search in Yahoo! Store. If you use another site search solution such as Celebros, SLI or Nextopia, jump to 3) at the end of these instructions.

Why is site search analytics important?

Image

I talked about the importance of site search before this feature became available in Google Analytics. The new site search feature in Google Analytics can give you insightful information, but you have to (unfortunately) implement a little hack in your Yahoo! Store in order to get this to work consistently. The tracking code looks for the search terms in the URL, but this is not always available when you do a site search. This hack describes the approach that I have taken to "force" the Yahoo! Store site search to display the search parameters in the URL all the time. However, every store is different so the specific steps you might take to get this to work could very well be a little different. If you are not comfortable adapting this approach for your Yahoo! Store, please contact your designer or me.

Of course the benefits of implementing this hack far outweigh the small effort to get site search analytics data.

Implementation

1) In the Store Editor, edit the nsearch page (which is the site search page).

Add a new site search form code in a visible field such as caption. Make sure to use the right identifiers specific to your store (yhst-123456789 or yourdomain.com) and design as necessary. This will essentially add another site search form to the page. What we want to do is get visitors to use this form instead of the one generated automatically by the template. My approach involves hiding the template form by using CSS. Take a look at the Head-tags field. I have overridden the Head Tags field and added some simple CSS to hide input fields.

Image

2) I want to make sure however that I only hide this specific form and not hide all input fields. In the template that generates the form field I made a simple modification:

Image

Using a TEXT operator, I just wrapped a simple div element with a unique id around the SEARCH-FORM operator. This now allows us to use a CSS rule to just target this div and hide the input fields inside of it.

3) You also have to set up Google Analytics to start tracking site searches. See here the official introduction and help file.

In the Query Parameter field enter: query,nquery

Image

Why the nquery? We can track zero-results searches, i.e those that returned no results. A true treasure trove of information. query and nquery will be lumped together in the Site Search reports, but you can get more detailed information in the Contents reports; just search for nquery in Google Analytics: Find URL.

Image

And for those of you using another site search tool, such as Celebros, just do a site search on your site and look at the URL and find the parameter that has the site search term. It’s likely to be also called query. Of course make sure that the site search results pages are tagged with our tracking code too.

Garbage KM data

New: Want to see Keyword Monkey data directly in Google Analytics? Get the Analytics Fox extension for Firefox

You may have seen useless "keywords" such as 49df1b7b1080dff2ab23cc8b… Well, these are searches coming from AOL and it seems that AOL masks the actual keyword. You will also see these "keywords" in your Google Analytics account. There is unfortunately little we can do about this as this is what AOL sends along as referrer information.

Keyword Monkey update

Keyword Monkey update. We have implemented a full-text search engine to make Keyword Monkey faster and more robust. The "In Store" column is back, but you can now also export your keyword data as a csv file, which will tell you if the search term is in your store as an exact match, broad match or not at all. We hope you'll appreciate to have this data in a more user-friendly format.

Yahoo! Store Fridays

We will be doing more webinars and adding training resources over the coming weeks. You can see that I have added a new tab in the top navigation called "Learn ". We have two webinars scheduled already for Dec 1 and Dec 8, so please check it out.