it is possible to know the user id (from a social network) that visit my website???

I made for the website a simple code that catch the usual data of the visitors of the website of my work (ip, agent, hostname, etc...).

But today my boss ask me if I we can know if the visitor came from a social network like facebook if it is possible to know the user ID.

It is possible?????
altariamx2003Asked:
Who is Participating?
 
Marco GasiFreelancerCommented:
The user id can be known only if the user allow you to know it: you have to ask to lofin with Facebook and then through Facebook API you can know his/her facebook user name.
About the site they come from, you can use the $_SERVER['HTTP_REFERER'] (http://php.net/manual/en/reserved.variables.server.php) but it is not affordable as explained in the Php manual.

Usually, hosting providers provide web statistics and you can get useful info. But the most qualified data are provided (AFAIK) by Google Analytics
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.