HTTP referer issue in browsers

  • rajputkashyap
  • Graduate
  • Graduate
  • User avatar
  • Joined: Aug 20, 2004
  • Posts: 198
  • Loc: USA
  • Status: Offline

Post September 11th, 2009, 7:15 am

Hello

New post after long time.. great improvement on ozzu forums

Well I am working on one functionality for that i need to extract refer information for those users coming from search engines or any other place, Its working fine for firefox I get good long referer url but in Internet explorer or any other browser i dont get referer information.. given below details

Firefox referer code

Code: [ Select ]
http://www.google.co.uk/url?sa=t&source=web&ct=res&cd=2&url=http%3A%2F%2Fwww.domain.com%2Fpagename.html&ei=a_WoSuWLBsyBkQWrpbyVBg&rct=j&q=search+keyword&usg=AFQjCNH_yOUWk3RPzByUXIjm7d07qelEfA


Internet Explorer code

Code: [ Select ]
http://www.google.co.uk/search?hl=en&q=search+keywords&meta=cr%3DcountryUK%7CcountryGB


I used to get http referer code using following php variable

$_SERVER['HTTP_REFERER']

Please let me know how can I get full referer in Internet and other browsers so i can track user behaviour

Please let me know if my query is not clear or require any further details

Thank you

regards
Kashyap
Moderator Remark: Disabled autoparse for URLs so entire examples are visible
Magento Development
Magento Themes
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post September 11th, 2009, 7:15 am

  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Joined: Jul 25, 2005
  • Posts: 2735
  • Loc: Nashville, TN
  • Status: Offline

Post September 11th, 2009, 7:35 am

$_SERVER['http_referer'] is still valid as of the latest PHP version. The browser can ultimately choose to not send this information, however, which is what you're probably seeing from IE8. I spotted a work-around for js transitions - perhaps you can tweak that to get what you need.
I'd love to change the world, but they won't give me the source code.
  • joebert
  • Sledgehammer
  • Genius
  • No Avatar
  • Joined: Feb 10, 2004
  • Posts: 13455
  • Loc: Florida
  • Status: Offline

Post September 11th, 2009, 4:24 pm

Are those two URLs you posted examples of the HTTP_REFERER you get when a visitor comes from Google ?

If that's the case then it is out of your hands. The details included in each URL are the result of the form submitted by the browser before they've even thought about your site.

Mozilla (Firefox developers) and Google do have quite a few agreements and projects with eachother. For example the default home page for Firefox on a new install of Ubuntu is a special Firefox-ified Google home page.

I think the extra information you're seeing is coming from either one of these special Firefox-ified Google home pages or something along those lines.

To have any control over it would be like being able to go back in time and select who your father mated with to influence your genes.
Strong with this one, the sudo is.
  • rajputkashyap
  • Graduate
  • Graduate
  • User avatar
  • Joined: Aug 20, 2004
  • Posts: 198
  • Loc: USA
  • Status: Offline

Post September 16th, 2009, 10:29 pm

I have seen the JS workaround but that doesnt seem to work for me, I know that google might be providing full details to firefox browsers not to others may be.. what I am getting with firefox is complete details about keyword user searched, landing page, position of that keyword in google specific version etc?

Not sure how to get all these details with other browsers, specially with Internet explorer.. as still IE dominates market and most of the users coming from that browser
Magento Development
Magento Themes
  • UPSGuy
  • Lurker ಠ_ಠ
  • Web Master
  • User avatar
  • Joined: Jul 25, 2005
  • Posts: 2735
  • Loc: Nashville, TN
  • Status: Offline

Post September 17th, 2009, 7:30 am

If IE chooses not to relay that information, I'm not sure there's anything you can do to collect it. From what I've read, IE8 is not passing it.
I'd love to change the world, but they won't give me the source code.
  • PolishHurricane
  • Mastermind
  • Mastermind
  • User avatar
  • Joined: Feb 17, 2005
  • Posts: 1585
  • Status: Offline

Post September 17th, 2009, 10:00 am

Yeah with referrer's, you get what the browser chooses to give you. You have no control over it unless it's coming from one of your own sites or from a site with such JS fixes on it. It can be useful information but you do not want to trust this information.

Referrers can be empty, the information can be spoofed for security/privacy or even to corrupt your data (fake google searches). Since there are so many firewalls that falsify or hide referrers, whatever statistical data you're trying to gather from the referrer most likely won't be very good data.

So you do not want to rely on the Referrer to display content, I hate websites that do this, it's unethical too when it comes to privacy.

If anybody here likes their privacy, wants to get around referral content blocking, or wants to throw false google data referrals, check this out: https://addons.mozilla.org/en-US/firefox/addon/953
There's no place like 127.0.0.1, badass part is now it's ::1
  • rajputkashyap
  • Graduate
  • Graduate
  • User avatar
  • Joined: Aug 20, 2004
  • Posts: 198
  • Loc: USA
  • Status: Offline

Post September 18th, 2009, 5:23 am

okay so nothing much to do here, unless browsers agrees to send data back, anyways..Thank you all for your great help as always

regards
Kashyap
Magento Development
Magento Themes

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 250 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 2011 Unmelted, LLC. Ozzu® is a registered trademark of Unmelted, LLC.