Google Analytics - Site Search - query parameter?

This forum is for all Flare issues not related to any of the other categories.
Post Reply
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Google Analytics - Site Search - query parameter?

Post by NorthEast »

For a while now I've been using Google Analytics Site Search, after seeing a suggestion here on the forums (I couldn't find the original post!).

For all of my sites, I've set the Site Search Query parameter to record the Highlight parameter, but I've been wondering whether I should to record the q parameter instead.

The difference is that q will trigger after the initial search (when you're on the search results page), whereas Highlight will trigger when you visit a page after clicking the result.

Using either parameter appears to work - e.g. they'll both record search terms and other information - but they're recording different data.

You could also record both Highlight and q, although I'm not sure if that'll improve or just duplicate the information recorded.

Has anyone tried both of these parameters, and know which is the best approach?
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Google Analytics - Site Search - query parameter?

Post by Psider »

What if the person runs a search, then doesn't click on a link (e.g. types another search term instead)? if you define the query as 'highlight' you don't capture the actual query.
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Google Analytics - Site Search - query parameter?

Post by NorthEast »

Psider wrote:What if the person runs a search, then doesn't click on a link (e.g. types another search term instead)? if you define the query as 'highlight' you don't capture the actual query.
That's what I presume will happen - it'll just record successful searches (where you click a result), but not searches where you didn't click on a result.

I was just wondering if anyone has tried setting up Site Search to record q instead of Highlight, and if that was better/worse.
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Google Analytics - Site Search - query parameter?

Post by Psider »

My opinion would be that it would be better to see all the things people searched on, not just the ones where they found a topic they wanted to click on. So for example, you might see common mis-spellings, or you might find terms people are searching for that aren't in your documentation. And if you log q, then you should be able to see the terms people search for that don't return any results - although this requires some javascript and/or extra google admin "stuffs", I believe (can you tell I haven't tried this yet :) )
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Google Analytics - Site Search - query parameter?

Post by NorthEast »

Psider wrote:And if you log q, then you should be able to see the terms people search for that don't return any results - although this requires some javascript and/or extra google admin "stuffs", I believe (can you tell I haven't tried this yet :) )
No, GA's Site Search wouldn't tell you that there are no results - it'd just tell you if people didn't visit a page after searching.

I had to write my own script to record an event in GA if there are no results.
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Google Analytics - Site Search - query parameter?

Post by Psider »

The web pages I've found about "no results" are a little confusing; I wasn't sure if you could get the search terms without setting q as the search query in GA. :)
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Google Analytics - Site Search - query parameter?

Post by NorthEast »

Psider wrote:The web pages I've found about "no results" are a little confusing; I wasn't sure if you could get the search terms without setting q as the search query in GA. :)
You can use either Highlight or q as the GA Site Search parameter.
They both work and collect data, but collect different data - so my question was which is better.
techwriter31
Propellus Maximus
Posts: 551
Joined: Wed Mar 05, 2008 10:50 am

Re: Google Analytics - Site Search - query parameter?

Post by techwriter31 »

Hi Dave - which did you end up using? For one site, we're using Highlight and this works. But as you mention, it only works when a customer clicks on a search result. For another site, we have the query parameter set to ?q= and aren't getting any results. Should this simply be q instead?
Kellie
Psider
Propellus Maximus
Posts: 811
Joined: Wed Jul 06, 2011 1:32 am

Re: Google Analytics - Site Search - query parameter?

Post by Psider »

I'm pretty sure just q. In my non-technical head, the ? is a separator between the web site address and Other Stuff(tm), so is neither part of the web site address, nor part of the Other Stuff.

I'm sure Dave will jump in to provide more accurate information. :)
NorthEast
Master Propellus Maximus
Posts: 6359
Joined: Mon Mar 05, 2007 8:33 am

Re: Google Analytics - Site Search - query parameter?

Post by NorthEast »

techwriter31 wrote:Hi Dave - which did you end up using? For one site, we're using Highlight and this works. But as you mention, it only works when a customer clicks on a search result. For another site, we have the query parameter set to ?q= and aren't getting any results. Should this simply be q instead?
Yes, just q

Same for Highlight, you don't enter ?Highlight=

I'm still using Highlight, which captures "successful" searches that lead to selecting a topic. Using q would track all search terms, whether or not a topic is selected.
I also track "unsuccessful" searches that have no results, by sending an event: viewtopic.php?f=13&t=27867#p127912
Post Reply