How to begin on this multi user PHP stats project?
December 5, 2006 12:24 PM
Subscribe
How would you write an application in PHP that tracks multiple users, and the users' multiple sites?
I need to write something that will track the stats of users' sites. Information such as: referrer, date/time, pages visited, length of session, search engine and search terms needs to be kept. A user should be able to enter a date range to see specific data over time.
There are plenty of stats packages out there, and they're fairly easy to write. However, I haven't found any that were made with the multi-user, multi-site problem in mind.
How best to store the data?
Throw it in an Apache like log, and only parse it when the user makes requests?
Put it straight into a mySQL DB? But then what would be a good way to keep the date/time data intact without having an enormous amount of rows to parse?
I'm an intermediate PHP developer, and this is the first project where I really couldn't think of the best place to start.
PS: When I say "multi user, multi site" I'm talking about a Google Analytics type setup. They have a very large amount of users, and an even larger amount of sites belonging to each user. However, my project is MUCH smaller in scale.
posted by gradient to computers & internet (7 comments total)
posted by miniape at 1:02 PM on December 5, 2006