Is it possible to count organic search visitors?

Asked

Viewed 37 times

2

I wonder if there is any tool/api to know from which site the visitor came, to account for visitors coming from the search engines. Thank you all.

1 answer

2


HTTP_REFERER

'HTTP_REFERER'

The address of the page (if any) through which the user’s agent accessed the current page. This policy is informed by the user’s agent. Not all browsers generate this header, and some still have the ability to modify HTTP_REFER content as a resource. In a nutshell, it is unreliable.


Just use as below, but do not trust this data.

$origem = isset( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : null;

Browser other questions tagged

You are not signed in. Login or sign up in order to post.