Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-05-2013, 12:09 AM   PM User | #1
instaunt
New Coder

 
Join Date: Apr 2010
Posts: 96
Thanks: 4
Thanked 0 Times in 0 Posts
instaunt is an unknown quantity at this point
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?
instaunt is offline   Reply With Quote
Old 02-05-2013, 01:19 AM   PM User | #2
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,529
Thanks: 0
Thanked 503 Times in 494 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
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/
felgall is offline   Reply With Quote
Old 02-05-2013, 01:23 AM   PM User | #3
tangoforce
Senior Coder

 
tangoforce's Avatar
 
Join Date: Feb 2011
Location: Your Monitor
Posts: 3,665
Thanks: 45
Thanked 456 Times in 444 Posts
tangoforce will become famous soon enoughtangoforce will become famous soon enough
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.
__________________
Please don't be rude: Put your php code in [php][/php] tags. It is a sticky topic at the top of the forum and it HELPS us to HELP YOU!
TIP: Coding styles and $end errors :::::::::: TIP: Warning: Cannot modify header information - headers already sent :::::::::: TIP: Quotes / Parse error: syntax error, unexpected T_..
PHP Code:
//Please don't use this for your form processing:
if (isset($_POST['submit']))
//Internet explorer has a bug and does not always send the submit value. 
Explanation: The IE if(isset($_POST['submit'])) bug explained.
tangoforce is offline   Reply With Quote
Old 02-05-2013, 02:54 PM   PM User | #4
instaunt
New Coder

 
Join Date: Apr 2010
Posts: 96
Thanks: 4
Thanked 0 Times in 0 Posts
instaunt is an unknown quantity at this point
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?
instaunt is offline   Reply With Quote
Old 02-05-2013, 06:16 PM   PM User | #5
felgall
Master Coder

 
felgall's Avatar
 
Join Date: Sep 2005
Location: Sydney, Australia
Posts: 5,529
Thanks: 0
Thanked 503 Times in 494 Posts
felgall is a jewel in the roughfelgall is a jewel in the roughfelgall is a jewel in the rough
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.
__________________
Stephen
Learn Modern JavaScript - http://javascriptexample.net/
Helping others to solve their computer problem at http://www.felgall.com/

Last edited by felgall; 02-05-2013 at 06:19 PM..
felgall is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:43 PM.


Advertisement
Log in to turn off these ads.