Page 1 of 1
Monitor site clicks
Posted: Fri Jun 13, 2008 6:53 pm
by Zavin
I am wanting to track clicks in my php site. I'm thinking that if I was able to monitor where my users where and where not clicking I could figure out how to better direct my traffic. Are there any good pre-made scripts or would I be better off writing something my self? And if I do write something myself will I need to write the code for every link in my site or is there a way to write it to just monitor every click?
Re: Monitor site clicks
Posted: Fri Jun 13, 2008 7:18 pm
by WebbieDave
Your web server logs every file that is requested. You could just use a log analyzer to find out what pages people are visiting.
If you want to roll your own logging mechanism (say you want to keep track of the pages visited in a particular session, and that session is handled in a cookie rather than the URL), you can include in all your php pages some code that stores the session id, page and timestamp in a database. I'm not sure of any premade scripts that do this but the basics would be trivial to code.
Re: Monitor site clicks
Posted: Fri Jun 13, 2008 7:33 pm
by Eran
Try google analytics
Re: Monitor site clicks
Posted: Sat Jun 14, 2008 11:09 pm
by Zavin
The session thing may be my best bet. Every member has to log in which starts a session and every page is wrapped with the header. So I guess I could write something in the header that would log every click into my database.
*to pytrin: I'm not sure analytics is going to work for me every search returned either a large script that is more than I need or a better way for logging search engine clicks.
Re: Monitor site clicks
Posted: Sat Jun 14, 2008 11:25 pm
by lonelywolf
Zavin wrote:...And if I do write something myself will I need to write the code for every link in my site or is there a way to write it to just monitor every click?
I think it's the problem of your code architect. If you setup a framework and using one point of access (many MVC frameworks implement this concept...), so it's not too difficult to archive your purpose.