Reputation: 356
I am in an infrastructure guy so forgive if the question sounds naive. I need to work with a dev partner in capturing the following data from a PHP web application.
The idea is to pump all this data to a data store to run machine learning algorithms to come up with near real-time recommendations. I would like to understand to what extend does a standard cookie can track this data. Is it possible to collect all of this data?
What is the right way to go about collecting this data?
Upvotes: 1
Views: 147
Reputation: 8168
Everything about the user can be stored in a database
for future reviews which is the best way to keep a track of user on what he does on the website.
To give a few ideas,
1) Time of entry ==> When the user enters the website just, having a
TIME_STAMP
field will do the trick, which will automatically update the user's entry value.2) For detecting OS => just use
var_dump(PHP_OS);
3) For detecting browser,device =>
$_SERVER["HTTP_USER_AGENT"];
will do the trick4) Current page the user is on => This can be stored in a
$_SESSION
variable and it can be kept updating every time the user goes to some other page and store that too in thedatabase
5) UserActions => Depends on what actions you want to capture and the same can be updated in the database as well.
Upvotes: 1