SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast devhen's Avatar
    Join Date
    Jul 2002
    Location
    Salt Lake City, UT
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $_SERVER['HTTP_REFERER'] Not working in IE

    I'm trying to track click-thrus from my Google AdWords and Overture ads. Adwords is working but with Overture my $_SERVER['HTTP_REFERER'] variable is empty when I get a click-thru in Internet Explorer.

    I can do this on the page that the ad is linked to:

    echo "REFER: ".$_SERVER['HTTP_REFERER'];

    In Mozilla Firefox I get this:

    REFER: http://search.yahoo.com/search?fr=fp...+pgp+sprinkler

    But in IE it is blank:

    REFER:

    IE reports Google AdWords referers fine. Its just the Overture links that report no referer.

    ???

    Can anyone help me? Thanks.

  2. #2
    SitePoint Addict devil cat's Avatar
    Join Date
    Apr 2003
    Location
    Reno
    Posts
    344
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    $_SERVER['HTTP_REFERER'] is not something you can rely on. It can be left blank in many browsers, although it does usually work for me in IE. You are going to need to find a different way to track them if you want it to work 100%.

  3. #3
    SitePoint Enthusiast andysmith's Avatar
    Join Date
    Jul 2003
    Location
    Wolverhampton, UK
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The best way is to set your adwords/overture ads to point to a certain referer id, for example:
    www.domain.com/?ref=adwords
    www.domain.com/?ref=overture

    Then you can do whatever with $_GET['ref'] - and it's 100% reliable.


Bookmarks

Posting Permissions

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