0

I just created a widget where I can see all the searches like in the screenshot. I use following filter regexp to get all urls I want see: q=([^&]+)

But it's still too much information, because I do not want see the whole url. I just want see the things between () like iphone or samsung.

Like in other languages you can slice out a part of a string with regexp and address those parts in example with $1, $2, etc.

Is there any possibility to just get them into the widget table or will I've to do it with events or something similar?

That is what I see.

Edit: As you see on this screenshot, I get the whole URL.

But I just want a result like that:

          What I get:                     What I want:
------------------------------        ---------------------
| /product/search?q=eos+650D |        |      eos+650D     |
------------------------------        ---------------------
|  /product/search?q=iphone  |        |      iphone       |
------------------------------        ---------------------

But it looks like this regexp filter q=([^&]+) is really just for filtering the URLs and not for better result display. So I've to do it with events or dimensions.

7
  • 1
    Google Analytics already has a built in feature for onsite search reporting (enable the tracking of site search from the profile settings using your relevant search query parameter). I'm unsure what you're trying to achieve differently? You can follow this tutorial for setting up this which does what you're after and then you an create the widget from the data in this report.
    – zigojacko
    Commented Feb 7, 2014 at 16:57
  • Thanks for this link. I just setup it with the get parameter q - but atm nothing shows up on analytics. Maybe it just works with new requests? But that would be strange, that google analytic can't parse it out of the old urls.
    – Jurik
    Commented Feb 7, 2014 at 17:18
  • @Geoff got it what I want. But as dan mentioned, it's just for google on site search and not for every get parameter. So I guess it's time for a google analytics feature request.
    – Jurik
    Commented Feb 8, 2014 at 22:10
  • @Jurik Yes, if you've only just enabled onsite search and specified your search query parameter then it will only report on onsite search from that moment onwards and not past data.
    – zigojacko
    Commented Feb 9, 2014 at 9:06
  • @GeoffJackson-zigojacko, if you'd post this link + maybe a quoted answer step by step, I'd mark it as correct answer and I think it will help people alot and that would be a good answer at all.
    – Jurik
    Commented Feb 10, 2014 at 9:26

1 Answer 1

2

Google Analytics has a built in feature that will allow you to grab the data which you are trying to capture.

You can enable site search like so:-

  1. Within Google Analytics, click the 'Admin' link (top right).
  2. Click the account that contains the web property and view for which you want to set up Site Search.
  3. Click the web property that contains the view for which you want to set up Site Search.
  4. Use the View menu to select the view that you want.
  5. Click the View Settings sub-tab.
  6. Under Site Search Settings, select Do Track Site Search.
  7. In the Query Parameter field, enter the word or words that designate an internal query parameter, such as "term,search,query". Sometimes the word is just a letter, such as "s" or "q". (for example: if the search URL looks like domain.com/?q= on your website, you'd enter just q in the query parameter field.

Read more on the Site Search settings and set up in Google Analytics.

There is also an illustrated step by step walk through of the process here.

After enabling Site Search in GA, you'll be able to access a report (like the below screenshot) showing all the entered search queries on your website from the left hand menu.

Behaviour > Site Search

Which you can then subsequently create widgets from or segment as and how you wish.

Site Search Report in Google Analytics

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.