The task: implement some similarity metrics\Analytics of website visitors.
How it is done now:
When entering the index runs actionCreate create a new object of type Visitor, if you create a fill in its properties ip, user agent, etc., then send it all to the database.
How I want to do:
when loading the page is loaded, some js file retrieves client data (ip, user agent, etc.) and sends them to the actionCreate (the name of the action in phantom), which in turn sends the data to the database.
how to implement the correct transfer of the necessary data, and in General working if the circuit will be (assuming that the client has js enabled of course)? Or necessary to continue to develop this all in php?