Page 1 of 1

Track Website Activity

Posted: Tue Jan 10, 2017 11:47 am
by mmobra
Hi All

New to PHP Programming and Im having an issue trying to get this working.

I have a site that basically has reports and I need to track (user login/logoff, report downloads, how many times each user searches each report ect...)

I would need that to either go to a log file or excel or something.

Help please

Re: Track Website Activity

Posted: Tue Jan 10, 2017 12:18 pm
by requinix
Okay. Is there a specific issue you have, or are you asking for general advice?

Re: Track Website Activity

Posted: Tue Jan 10, 2017 12:22 pm
by mmobra
I am asking for general advice on how to do this.

Re: Track Website Activity

Posted: Tue Jan 10, 2017 9:28 pm
by requinix
Put everything into a database first, then you can export it into whatever format you want later.

Can you come up with a list of exactly what you need to track? Or at least the types of things you want to track, like "when the user does something with a report"?

Re: Track Website Activity

Posted: Wed Jan 11, 2017 9:12 am
by mmobra
I would like to track the following...

1. When a person logs on and off.
2. What reports they download.
3. How many times they search a report.

For starters that would be great.

Re: Track Website Activity

Posted: Wed Jan 11, 2017 9:21 am
by requinix
I'm asking because it might be annoying later to discover you want other reports that don't quite fit into the system you'll be designing now.

I suggest two log tables: one for login and logout actions (with ID, date, user ID, and action like "login" or "logout"), the other for report-based actions (with ID, date, user ID, report ID, and action like "download" or "search"). Insert into them when the respective actions occur.

Re: Track Website Activity

Posted: Wed Jan 11, 2017 11:38 am
by mmobra
Do we have some code that I can try as like I said before very new to this?

Re: Track Website Activity

Posted: Wed Jan 11, 2017 11:33 pm
by requinix
Not really.

How were the sites originally developed? Whoever did that would be the best to add this logging functionality, because otherwise you'll need to start learning some web programming - PHP, MySQL, stuff like that.