What is the best way to collect and report statistics from within views 3's exposed filter? I have a content type "song" and created a view on it. Using Views 3 exposed filter, people can search with different criteria. 



With Google Analytics, I can collect some rough statistics. But I do not want anonymous statistics. I would like to collect and report the criteria by the login user/roles.

I can put a PHP code into my view so that every time someone interacts with this view, the PHP code will collect the criteria from the URL and save to a table.

Is there a better way? 

EDIT

I've got an interim solution:


Write a custom module that uses hook_form_alter to update the exposed filter form. See link.
Install Views Watchdog
Create a view that reports on these watchdog entries. I can use PHP to parse the watchdog's location field to get my reports better. 


If you have a better alternatives, please let me know.
You can use GA Push module:


  GA Push offers an API to enqueue informations that are sent GA
  servers, and three submodules to track browser events (using jQuery),
  form validation errors and log exceptions.


Instead of saving the data in your custom table you can just send it to Google Analytics.

Collect your data in your PHP code and send it like this:

      $push = array(
        'eventCategory' =&gt; $category,
        'eventAction'   =&gt; $action.
        'eventLabel'    =&gt; $label,
        'eventValue'    =&gt; $value,
      );
      ga_push_add_event($push);


You may hook on the form submit instead of adding PHP code to the view.