E
E
Evgeniy Samoilenko2015-10-21 09:42:28
Laravel
Evgeniy Samoilenko, 2015-10-21 09:42:28

How to properly track unauthorized users on the site?

Given:
A corporate website with a laravel admin panel written for it.
I want to:
Somehow identify users who are not logged in, in order to display full information about the user's visit in the admin panel (This is not a copy of the metric, it is done for certain purposes).
Thoughts on how to do it:
Using middleware, look into the database if there is such a user there (ip, cookies), if there is no such user, we put a cookie in him and write his ip with the cookie that he put into the database. (If the user clears the cookies, it’s not critical ).
Further, with each transition through the pages, we write to the database the slug of the page, the time of the visit and other necessary information.
Does such an option have the right to life? Or are there things I missed.
It is not yet possible to use sockets for this, because the project is hosted on shared hosting. If I'm wrong and there is a normal solution for this on sockets or something else - please show me.
If there are packages for such a case, I will also be glad to see.
Thank you for your attention!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rustamka Vorontsov, 2015-10-22
@rmfordev

For your option, there is generally a Yandex metric, keep track of your health.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question