Google Blogoscoped

Forum

Google Analytics Site Search Problems

NSteffy [PersonRank 0]

Friday, March 21, 2008
16 years ago2,345 views

I am working on adding site search items to my Google analytics tracking and have run into an odd snag. The company I work for (and am setting this up for) runs multiple websites across several domains that all have search boxes linking to search process pages to perform the search and display the results. Our search boxes currently submit the data using the POST method, so that the search terms are not included in the URL. Seeing how many search boxes we have, and that POST is our precedent, I have added javascript code to our search pages to grab the search string and send it off to google using a call like this: "pageTracker._trackPageview('somepage/search.asp[problemArea]' + searchString);" (this is much better than going through and modifying n number of pages with search boxes so they send their data using a GET method instead of POST.)

Perhaps I have delved deeper than most but, if you use firefox with firebug you can use the "net" tab to pick apart the data sent to google. If you do this you find that under the "_utm.gif" image there are many Params sent off, one of which is "utmp" which holds the string included in the _trackPageview call. (eg using above: utmp: 'somepage/search.asp?search=searchString') If nothing is passed in the trackPageview call, the utmp simply holds the URL of the page minus the host.

Now with all that out of the way, heres my problem:
The issue I am running into involves the portion marked [problemArea] above. I tried to use "?search=" so that the string sent is basically a url like: somepage/search.asp?search=searchString

When I do this, the "_utm.gif" file that carries the data to GA gets sent without data. The utmp value is blank. This is a problem, as google then has no way of knowing what page was visited, which kills any sort of tracking. Not to mention that obviously the search string is not sent, which is the whole point of this exercise.

After further testing I have determined that the cause of this issue is the '=' (equals sign). If I replace = with – utmp is exactly what I would expect. Now in our system I am on the technical end of setting up the tracking, but I am NOT the one getting the results or viewing the data. The reason for using the equals sign is so that the stat's guy can search through and filter the results more easily.

Does anyone else have this same problem? Is there another alternative? Perhaps there is another way for the stat's guy to filter his results so that this is not necessary. Any comments or suggestions are welcome.

thanks
-Nathan

Forum home

Advertisement

 
Blog  |  Forum     more >> Archive | Feed | Google's blogs | About
Advertisement

 

This site unofficially covers Google™ and more with some rights reserved. Join our forum!