Monitor site clicks
Moderator: General Moderators
Monitor site clicks
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?
-
WebbieDave
- Forum Contributor
- Posts: 213
- Joined: Sun Jul 15, 2007 7:07 am
Re: Monitor site clicks
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.
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
Try google analytics
Re: Monitor site clicks
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.
*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.
- lonelywolf
- Forum Commoner
- Posts: 28
- Joined: Tue Jun 10, 2008 6:15 am
Re: Monitor site clicks
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.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?