I want to record the number of times each user in the site logs in to a certain page, and the number of times a certain method is used (such as a button in the site to obtain data. When the user clicks, it is counted, and a user clicks at a certain time).
Finally, you can download this Log in excel format.
Is it appropriate to express this process as "user monitoring"?
I can't formulate an idea now. I don't even know whether or how to build a table. I have no idea how to complete this task.
I heard others say that it can be done with the help of the loggable component. But I can't find the relevant documentation. I don't know what this component is and how to use it.
please help.
習慣沉默2017-05-16 16:46:42
If they are all publicly accessible pages and there are no requirements for absolute values, there is no need to use back-end code for statistics. Just use Google Analytics (js, hereafter referred to as GA).
GA will record users’ visits to your website by default; for pages with small visits and clicks within the page, you can use GA’s event tracking.
If GA is not applicable, then write a listener in symfony to monitor the kernel.request event. All requests to your web app must trigger this event.