I currently have a tracking system that logs referers for all tracked actions.
To achieve this I'm using $_SERVER['HTTP_REFERER']
in PHP.
My issue is that sometimes, the above returns nothing. When it works, it returns the last referer, which seems to be completely WAI.
When I double-track using google analytics, GA returns the very site from which the request originated.
I'd like to know how I can achieve that myself, or if it is even possible?