I am looking at putting together a very simple stats application. I wanted to track a count of sessions, page visits and referrers.
I've been looking around quite abit but most examples I see are way to advanced. I'm looking for a simple, small solution.
My thought is to put an include on every page that does the following:
- start a session is one doesn't exist
- if it is a new session, increment the session count in the mysql db.
- log the referrer in the db, if its a new session and a refferer exists
- increment the page_view count in the db
Are their any flaws in my logic?
Do you have any suggestions?