The Case of the Misplaced Site Search Data

The Case of the Misplaced Site Search Data

/

What does it mean when “search/organic” turns up as Source/Medium in your Google Analytics reports? It could mean some of your visitors are using the search engine Search.com (yes, there really is a search engine called that), but it could also be bad data because Google Analytics mistakenly attributed visits to Search.com even though they came from somewhere else.

Data Investigating Bad Data

How could that happen? Suppose your site www.anything.com has a search box (of course it does!) so visitors can search the entire site. Unfortunately, the site search engine returns search results pages with URLs like this:

search.anything.com?q=anything

I say, “unfortunately,” because that’s exactly the kind of URL that Google Analytics mistakes for the search engine Search.com.

How Site Search Gets Mistaken for Organic Search

Google Analytics keeps a list of search engines, and it recognizes them by looking for certain items in the referring domain and referring page query string. If the domain contains “search” and the query string contains “q” then GA thinks the referrer is Search.com.

There’s even more bad news. Suppose this visitor originally came to your site from an email campaign, which you cleverly tagged with cool campaign info (newsletter/email), as you should. As soon as the visitor uses your site search, GA mistakenly sees a new traffic source (search/organic)… and starts a brand new session.

This scenario played out recently for one of our clients. The previously documented solution, using _addIgnoredRef, did not work. So we reported it to Google engineers, who reproduced and confirmed the issue and promised to get back to us with an update.

In the meantime, we devised a simple workaround that immediately improved the data. If your data has been compromised by this issue, it can help you, too.

How To Fix It

Our solution is a little script that we include on every page on search.anything.com. The script looks at all the links on the page and if a link goes to anything.com, it appends a parameter to the URL that tells GA not to change the source/medium to search/organic.

If you’re already familiar with GA parameters you’ll see the key to the script is the parameter utm_nooverride=1, which is more typically used when visitors return to your site from third-party shopping carts, or for ad campaigns where you don’t want to overwrite existing referral data.

In this case, utm_nooverride=1 means GA won’t write a new traffic source (and mistakenly start a new session) just because a visitor uses site search.

Remember you also need to refer to the jQuery library before you call the script, like this:

Have you come across this issue on your own site or a client’s? If so, how did you handle it? Please share in the comments.

Update: Google rolled out a fix in February 2012 so that this is no longer an issue. See the official changelog – scroll down to the entry for February 1, 2012.

Dorcas Alexander is the Analytics Department Supervisor. Her path to LunaMetrics followed stints in ad agency creative, math, and computer science. Dorcas has a master's degree in language and information technologies from Carnegie Mellon University, where she helped build precursors to a Universal Translator. One of the top-rated tournament Scrabble players in Pennsylvania, Dorcas has an insatiable drive to compete and win.

Contact Us.

LunaMetrics

24 S. 18th Street, Suite 100,
Pittsburgh, PA 15203

Follow Us

1.877.220.LUNA

1.412.381.5500

getinfo@lunametrics.com

Questions?
We'll get back to you
in ONE business day.