2

I set up my website so that I'm tracking the $_SERVER['HTTP_REFERER'] of every page visit. I'm also using Google Analytics. What's confusing me is that I'm seeing discrepancies. For example, GA shows that someone was referred to my site from m.facebook.com, but my list of referrals captured through PHP does not show that. Conversely, with my PHP I've seen some referrals from Bing such as http://www.bing.com/search?q=some+search and yet these don't align with what GA shows.

Can someone help me make sense of this? What are the differences in how the referral is calculated in each of these instances?

Subpar Web Dev
  • 3,210
  • 7
  • 21
  • 35
  • Could it be something to do with referring pages using HTTPS? That's described in [this question](http://stackoverflow.com/questions/7620328/is-there-referrer-header-while-using-ssl). – legoscia Jan 19 '16 at 16:37
  • 2
    referers are not sent in https, because that can leak information from the secure side into the insecure side. GA can track such things because it's loaded on both sides of the link, which your PHP stuff has no access to. – Marc B Jan 19 '16 at 16:43

0 Answers0