Google Analytics - Site Search - query parameter?

This forum is for all Flare issues not related to any of the other categories.

Google Analytics - Site Search - query parameter?

Postby Dave Lee on Fri Nov 24, 2017 7:39 am

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?
Dave Lee
Master Propellus Maximus
 
Posts: 5657
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Google Analytics - Site Search - query parameter?

Postby Psider on Sun Nov 26, 2017 4:31 pm

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.
Psider
Propellus Maximus
 
Posts: 595
Joined: Wed Jul 06, 2011 1:32 am

Re: Google Analytics - Site Search - query parameter?

Postby Dave Lee on Tue Nov 28, 2017 1:22 am

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.
Dave Lee
Master Propellus Maximus
 
Posts: 5657
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Google Analytics - Site Search - query parameter?

Postby Psider on Tue Nov 28, 2017 8:00 pm

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 :) )
Psider
Propellus Maximus
 
Posts: 595
Joined: Wed Jul 06, 2011 1:32 am

Re: Google Analytics - Site Search - query parameter?

Postby Dave Lee on Wed Nov 29, 2017 12:51 am

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.
Dave Lee
Master Propellus Maximus
 
Posts: 5657
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Google Analytics - Site Search - query parameter?

Postby Psider on Wed Nov 29, 2017 1:42 am

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. :)
Psider
Propellus Maximus
 
Posts: 595
Joined: Wed Jul 06, 2011 1:32 am

Re: Google Analytics - Site Search - query parameter?

Postby Dave Lee on Wed Nov 29, 2017 3:41 am

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.
Dave Lee
Master Propellus Maximus
 
Posts: 5657
Joined: Mon Mar 05, 2007 8:33 am
Location: UK

Re: Google Analytics - Site Search - query parameter?

Postby techwriter31 on Sat Oct 05, 2019 9:14 am

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
techwriter31
Propellus Maximus
 
Posts: 539
Joined: Wed Mar 05, 2008 10:50 am

Re: Google Analytics - Site Search - query parameter?

Postby Psider on Sun Oct 06, 2019 5:44 pm

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. :)
Psider
Propellus Maximus
 
Posts: 595
Joined: Wed Jul 06, 2011 1:32 am

Re: Google Analytics - Site Search - query parameter?

Postby Dave Lee on Mon Oct 07, 2019 1:20 am

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
Dave Lee
Master Propellus Maximus
 
Posts: 5657
Joined: Mon Mar 05, 2007 8:33 am
Location: UK


Return to Flare's General Discussion

Who is online

Users browsing this forum: No registered users and 5 guests