E
E
Exploding2017-07-03 17:41:54
PHP
Exploding, 2017-07-03 17:41:54

Monitoring user activity in the admin panel in the form of a timeline! //?

The details are as follows: The
store's admin panel, where employees enter each under their own account.
Now, for the time being, only the time of the first entry is registered within a day, but this data is not enough, and now the idea came up to make a user activity scale for the day.
As an example of the result: the timeline in the player of the Yandex webvisor. Of course, the player itself is not needed, only a scale with colored sectors, where each color is predetermined and corresponds to a certain type of activity / inactivity.
I have sketched the following notes so far:
1. Separate activity by event type (in order of increasing "weight" of the event):
- idle / inactive: the absence of any events for ~ 2 minutes.
- medium activity: click or mouse movement
- high activity: pressing buttons on the keyboard. By timeout of ~2 min. consider the activity completed.
2. Writing directly to the database, I think it will of course be very resource-intensive (or maybe not, xs), so I think the data in json will first be collected in localStorage, and then, for example, with an interval of 5-10 minutes, this "package" is already will go to the DB table.
3. In the table, I thought to store it in the form 1 record = activity of a certain user per day (in the format serialize (phpArray))

So far I came up with this ... And actually I wanted to consult, maybe someone did something like that or tell me how best to organize the array structure for data storage, or I don’t see any “pitfalls” in my “plan”, or maybe I started thinking in the wrong direction, or something else useful ...

As for such a task - to connect and depend on some ready-made services, I will not do it for sure.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rikcon, 2017-07-04
@Rikcon

https://piwik.org/
This is a quick solution in the forehead, put, place the tracker code only in the admin panel (adblock, by the way, blocks it if anything).
Make a reinforced concrete decision yourself based on actions on the backend and not on the frontend, then no one will block anything.
And so read the docks of the beer, I think you can send events from the backend there.
I did not use it myself if that.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question