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?
I've got an interim solution:
- Write a custom module that uses
hook_form_alterto 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 locationfield to get my reports better.
If you have a better alternatives, please let me know.