Although this is not quite what I was looking for, it seems that you can create virtual pageviews to track search results programmatically.
Suppose you set up a site search parameter called "q" so that when a URI that contains q=these+are+some+terms , GA will mark it as a search result. You can use the _trackPageview() method to create virtual search queries like this:
pageTracker._trackPageview('/custom/search?q=These+are+some+terms')
Mike caron
source share