if you are in the look for an easy way to track internal search queries with Google Analytics here is how to do it setting up the __setVar()
javascript code.
Step 1. In your form tag:
action=”actionname”
onSubmit=”javascript:__utmSetVar(document.formname.searchboxname.value);”>
2. Everytime that someone searches for anything in your search form
they will be segmented according to their search query. Now, what if you want to track more than 1 query per visitor? In this case what you would do is set the urchinTracker() javascript call instead of the utmSetVar(). Assign a unique name to the page view and exclude that name from your profile to avoid “inflating” your stats.
In Google Analytics in the first case the information will appear under: VISITOR SEGMENT PERFORMANCE > User Defined Segment or by cross segmenting any report with the user-define tab. In the second example each query would represent a separate pageview.That is it.
Simple, Easy and Powerful.