Integrating with existing system

Hi there

I am in the process of developing an events website. I would like the users to be able to see which of their events they have added are most popular. What I’m not sure about is how to link my database with pikwik ( just for reference I’m using php). The event id is stored in the url so the address would look like this domain.com/events/38/

The only thing I can think of is to query the events database for the event id of all events by a user, build an array and do a sequence of queries to the pikik database. Which seems horribly inefficient. It would also mean that the query would have to search for “/38/” within the url rather than doing a simple numerical match.

If anyone has any suggestion please let me know

Thanks very much

Kia

you can search for specific pages using the API parameters (http://dev.piwik.org/trac/wiki/API/Reference):

filter_pattern ; defines the text we want to search for in the filter_column. Only the row with the given column matching the pattern will be returned.

filter_column ; defines the column that we want to search for a text (see filter_pattern).

If your pages are in directories, you can use the recursive search:
* filter_column_recursive ; defines the column to be searched for when recursively searching for a pattern filter_pattern_recursive
* filter_pattern_recursive ; defines the text we are searching for. Only the matching rows are returned. This filter is applied to recursive tables (Actions / Downloads / Outlinks tables)