1

We have a drupal 7 website, getting about +50.000 unique visitors each day. For statistical purposes, we are logging the events on the site, and one of the items logged is the referrer $_SERVER['HTTP_REFERER']. However, this is only captured less then 4% of the time, for 96%, $_SERVER['HTTP_REFERER'] is NULL. I know that $_SERVER['HTTP_REFERER'] isn't a trustworthy item, but 4% seems extremely low to me! I wrote a seperate PHP testscript to capture and log $_SERVER['HTTP_REFERER'], and this one works flawless, and the referer is filled in each time, from each browser/system/location I've tried. The Drupal 7 installation runs on 2 apache nodes with an apache loadbalancer.

Any tips on what might cause $_SERVER['HTTP_REFERER'] to be removed?

9
  • Is there some kind of server-side redirect, when the page loads?
    – Peon
    Dec 17, 2013 at 9:30
  • You mean in the httpd .conf or .htaccess files?
    – Borniet
    Dec 17, 2013 at 9:33
  • The address of the page (if any) which referred the user agent to the current page. This is set by the user agent. Not all user agents will set this, and some provide the ability to modify HTTP_REFERER as a feature. In short, it cannot really be trusted. documentation here
    – Parixit
    Dec 17, 2013 at 9:33
  • @Parixit Agree, it cannot be trusted, that I also mentioned in my question. But only 4% that has a HTTP_REFERER is too low. It should be somewhere around 60% to 80%, depending on the type of users you have (tech-minded vs not). The majority of our users are not tech-savvy.
    – Borniet
    Dec 17, 2013 at 9:37
  • @Borniet All users came to your site from other domains or your domain?
    – Parixit
    Dec 17, 2013 at 9:37

1 Answer 1

-1

Maybe this can help you to track your users

https://api.drupal.org/api/drupal/includes!common.inc/function/drupal_get_destination/7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.