when a user searches from google and lands on our site from the results he/she was shown in the results page, is there a way for my site to detect that he came from google?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Check the
$_SERVER['HTTP_REFERER']variable which should contain the referring URL. Please note that this is not tamper-proof or fail-safe as theHttp-Refererheader can easily been changed or modified by a client.EDIT: Just googled for
phpinfo(because chanes were high that I get aphpinfo()page that shows the$_SERVER['HTTP_REFERER']variable) to show you how theHttp-Refererwill look like:As you see, you can also extract the search term used in the google query (or detect if the search was initiated by the Google Chrome address bar)…