CodeIgniter Forums
Google Analytics: Site Search - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Google Analytics: Site Search (/showthread.php?tid=32415)



Google Analytics: Site Search - El Forum - 07-22-2010

[eluser]theseamusjames[/eluser]
So we have a custom built search function on our site, and it works perfectly. But we want to be able to track what people search for using Google Analytics' Site Search tracking. We use session variables to pass our queries (yes, I know it cant track that), so I appended a query string in the form of "q=whatever+youre+looking+for" at the end of our search function. The whole query would look like this:

http://www.prerace.com/races/keyword/q=whatever+youre+looking+for

I set our query parameter to 'q', but we're still not getting any results.

Also, our search function actually redirects to the function above. The form points to /races/search/ which redirects by type of search. But google doesn't know which page is a search page and which is any other page anyway - I think it just looks for URIs with 'q=whatever' in them and breaks out the keywords.

Any ideas?