1

When we click a link on a website and visit that link the HTTP request contains the previous site as the HTTP referrer. But if I click a link inside a email I have received, that HTTP request does not contain a HTTP referrer field...(clicking a link in a email received to my gmail)

So my question is, do we have a method to distinguish between these two scenarios ?

I mean any method to identify these two clicks separately using parameters in the HTTP request

2 Answers2

0

I think, that when You click a link on a https page the header not contains the HTTP referrer (in php: $_SERVER['HTTP_REFERER']). And google use https, so from links in gmail the HTTP referrer not send.

Tovask
  • 337
  • 3
  • 5
0

Just like explained in my previous answer, don't rely on the referrer.

Just use a query string parameter like &source=email, &fromemail=true or &campaign=email.

Community
  • 1
  • 1
CodeCaster
  • 147,647
  • 23
  • 218
  • 272