Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    Apr 2010
    Posts
    118
    Thanks
    6
    Thanked 0 Times in 0 Posts

    SERVER['HTTP REFERER'] no longer any use?

    I have a script that runs based on the page/site that referred the user to that page.

    20 out of 400+ visitors actually ran the script. SERVER['HTTP REFERER'] apparently returned no value for the majority of them.

    I have Firefox (Mac and Windows), Safari, IE and Chrome. Only my Mac Firefox browser didn't send the referer information when I tested the script so I thought it would be pretty useful.

    20/400 doesn't sound useful.

    Google Analytics must have something that can get the information? They seem to know every website the users have come from?

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,603
    Thanks
    0
    Thanked 645 Times in 635 Posts
    Anyone browsing via the privacy option in their browser would not have that header set. Also some firewalls also strip out that header. If the originating page uses HTTPS then the referrer doesn't get passed either. When any of those is done then the information is not available for anyone to get.

    The header can also be set to any value using web development tools in the browser so checking it is not useful for any purpose involving security.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    Senior Coder
    Join Date
    Feb 2011
    Location
    Your Monitor
    Posts
    4,298
    Thanks
    57
    Thanked 525 Times in 512 Posts
    Blog Entries
    5
    Also don't forget that not all visitors will come to you from a referrer. Some will just come to you directly by typing in the address or using a bookmark.

    A referrer is literally the address of a page that had the link referring the visitor to you.
    See my new CodingForums Blog: http://www.codingforums.com/blogs/tangoforce/

    Many useful explanations and tips including: Cannot modify headers - already sent, The IE if (isset($_POST['submit'])) bug explained, unexpected T_CONSTANT_ENCAPSED_STRING, debugging tips and much more!

  • #4
    Regular Coder
    Join Date
    Apr 2010
    Posts
    118
    Thanks
    6
    Thanked 0 Times in 0 Posts
    So how is Google Analytics tracking almost everything? Is it just because most sites have Analytics code on them so Google knows what everyone is doing all the time?

  • #5
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,603
    Thanks
    0
    Thanked 645 Times in 635 Posts
    Quote Originally Posted by instaunt View Post
    So how is Google Analytics tracking almost everything?
    It isn't. There are lots of groups of visitors that it doesn't track at all.

    For example Analytics doesn't track any of my visits to any pages anywhere on the web that I go to because I blocked their site so as to speed up the download of the web pages - since there is no benefit to me to have my visits tracked by Google.

    Anyone with JavaScript turned off for a site or who doesn't have it at all doesn't get tracked.

    Also the referrer is as inaccessible to Analytics as it is to you in those situations where Analytics even knows that the visitor exists.

    Overall you can track more about your visitors than Analytics can because of the information logged on your server that Analytics doesn't see.
    Last edited by felgall; 02-05-2013 at 06:19 PM.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •