Is there a way that I can determine if someone has clicked the link in a email vs if they typed the url in their web browser rather than clicking the link?
When I look at the weblogs I want to determine how the page was accessed, would this be a case of a unique url in the email?
CodePudding user response:
Unique links would be one option. Depending on your needs, a simple querystring such as ?source=email
could suffice. Of course, if somebody were to type this into the address bar, then it looks as if it were accessed from the email.
CodePudding user response:
$_SERVER['HTTP_REFERER']
If the user is coming via e-mail, you can detect it with referrer. If the user is coming from the browser (unless manipulated) the referer will be empty. http_referer