how do you detect if your website visitor came from a google search result?

前端 未结 6 475
粉色の甜心
粉色の甜心 2020-12-03 16:06

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?<

6条回答
  •  情歌与酒
    2020-12-03 16:52

    You would check the $_SERVER['HTTP_REFERER'] if you wanted to do it in PHP. You can also use document.referrer in javascript.

提交回复
热议问题