Hey everyone,

My apologies if this is similar to any other recent posts but I was unable to find any using the search function.

My work involves helping develop a web application that keeps track of lots of client info and organizes it for staff to view in what is (hopefully) a convenient and effective manner. The application is based in PHP but makes use of a lot of javascript as well. We would like to create a module for the application that allows us to see exactly how the users are navigating and using what we've given them so far. In order to do this, we would like much more detailed information than simply linking user accounts to page requests/form submissions. The sort of information we're looking for would most likely consist of things like

  • Changing the slection on a dropdown/radio button
  • Using a button that does not perform any kind of GET/POST
  • Clicking on a filtering checkbox


Seeing as all of this interaction takes place on the client side, javascript seems like the only answer I've come up with for keeping track of it. The idea that I have been considering would be based around creating a new javascript file to be included on every page which would provide a data structure to append user activity information to (what button was clicked, where on the page the click occurred, javascript function name), and then submit that log whenever a new page was requested. I can imagine a few problems with this solution already, such as recording activity on the final page the user visits and the fact that this would probably require us to add a line to every single function we intended to log (it's a fairly old, large application).

So the questions I have about this are...

Does this sound like we're heading in the right direction so far, or is there a simpler solution to the problem? Is this probably going to cause a lot of overhead, or should the right implementation be fairly unnoticeable? Does anyone know of any software/libraries (paid or free) that might do this already or at least speed up the process?

Whether you think this is headed in the right direction or not, I would greatly appreciate any tips that you think would be good to remember as I'm far from an expert in this and may take some things you find obvious for granted.