separate email traffic from website traffic

63 views Asked by At

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

There are 2 answers

0
Tovask On

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.

0
CodeCaster On

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.