Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

My site search works as follows:

  • client types query into form and presses submit
  • it GETs the search page /search?q=keyword
  • that page redirecs the client to /products/keyword, which shows the search results

How can I use Site Search for Google Analytics with my setup?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

Have you tried using the recommendation for POST-based search? Basically you have the analytics code on the results page "lie" to GA and send a virtual pageview with your /search?q=keyword URL. You're obviously not issuing POST queries, but the underlying problem being addressed isn't really about the request method, just that you have a URL with no query parameter.

share|improve this answer
    
I hadn't read that article. It seems to cover only an old JS, though? Mine begins: var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXXXXX-X']); _gaq.push(['_trackPageview']); –  Tim Sep 10 '12 at 9:04
    
_gaq.push(['_trackPageview', '/url']); seems to be the current way of doing this. I'll try and see if it works. –  Tim Sep 10 '12 at 9:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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