We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 23,716 times

Contents

Related Categories

Managing banner ad clickthroughs - Ignoring user agents

cyasp

Ignoring user agents

The next idea was to ignore clickthroughs from all user agents (browsers) except IE, Netscape and Opera. Again, I let them clickthrough, just don't make the advertiser pay for them.

// ignore any user agent that isn't Mozilla (IE and Netscape) or Opera
var sAgent = '' + Request.ServerVariables ( 'HTTP_USER_AGENT' );
// make lowercase
sAgent = sAgent.toLowerCase ( );
// should we count this agent?
if ( -1 != sAgent.indexOf ( 'mozilla' ) || -1 != sAgent.indexOf ( 'opera' ) )
{
    // it's an unknown user-agent
    bIgnoreClick = true;
}

It was suggested that I also ignored known IP addresses used by spiders. I found an excellent source at Search Engine World that documents these.

After investigation however, I noticed that all major spiders except one, Lycos, used very unique user agents. They would all get caught by the user agent check above!

Lycos was an exception - their spider sometimes masqueraded as IE 5.0. Luckily, they also have "Lycos_Spider" in the agent string, so I modified the test above to cope with that too:

// should we count this agent?
var bKnownBrowser = ( -1 != sAgent.indexOf ( 'mozilla' ) || -1 != sAgent.indexOf ( 'opera' ) );
if ( -1 != sAgent.indexOf ( 'spider' ) )     // lycos spider acts like mozilla
    bKnownBrowser = false;
if ( !bKnownBrowser )
{
    // it's an unknown user-agent, so ignore them
    bIgnoreClick = true;
}

Comments

  • hello

    Posted by zbroot on 25 May 2005

    [url="http://da.vip.sina.com"]http://da.vip.sina.com[/url]
    [url="http://www.cndmoz.com"]http://www.cndmoz.com[/url]
    [url="http://www.webdmoz.com"]http://www.webdmoz.com[/url]

  • bbbb

    Posted by zbroot on 18 May 2005

    http://www.filmwz.com ????
    http://www.filmwz.com/movie_map/movie_map1.htm ????
    http://www.filmwz.com/movie_map/movie_play_map1.htm ????
    http://www.filmwz.com/movie_map/movie_down_map1....

  • aaaa

    Posted by zbroot on 18 May 2005

    http://www.cndmoz.com ??????
    http://www.webdmoz.com ??????

    [u]http://www.webdmoz.com[/u]
    [u]http://www.cndmoz.com[/u]

  • aaaa

    Posted by zbroot on 18 May 2005

    http://www.filmwww.com/movie_map/movie_map1.htm ????
    http://www.filmwww.com/movie_map/movie_play_map1.htm ????
    http://www.filmwww.com/movie_map/movie_down_map1.htm ???
    http://www.filmwz....

  • aaaa

    Posted by zbroot on 15 May 2005

    [url=http://www.wg173.com]?????[/url]
    [url=http://www.hit-e.com]????[/url]
    [url=http://www.filmwww.com]????[/url]
    [url=http://www.ssfilm.com]????[/url]
    [url=http://www.xzfilm.com]????[/url]
    [url=...