1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Banner Advertising?


Suppose I posted a banner advertisement on a web site and want to know some info about who is visting and how many are there on that banner specifically (not the number of visitors on the page as a whole). Is there any asp.net code with vb.net to do this job and where I can find it?

One Response to “Banner Advertising?”

  • Hybrin says:

    I'm not sure about asp or vb, but with the almighty PHP, simply check log the visitors referring agent.
    $_SERVER['HTTP_REFERER'],

    You could also give the banner a special URL that passes a variable like the following:
    http://yoursite.com/?trackVar=bannerAd1

    if($_GET[trackVar]=='bannerAd1'){
    // store the info to your database here.
    }

    Or for a more complex way of tracking the page loads on the site that hosts the banner, you could reference a php script on your server that generates the banner image as well as logs the banner load.

    $database = 'dbName';
    $dbServer = 'localhost';
    $userName = 'loginName';
    $passWord = 'password';
    $conn = mysql_select_db("$database", mysql_connect("$dbServer", "$userName", "$passWord"));
    header("Content-type: image/png");

    $date = date('Y-m-d');

    $im = imagecreatefrompng("bannerImage.png");
    $orange = imagecolorallocate($im, 51, 102, 204);
    $px = (imagesx($im) – 5 * strlen($date)) / 2;
    imagestring($im, 1, $px, 4, $date, $orange);
    imagepng($im);
    imagedestroy($im);
    // Get Email From DB

    $update = mysql_query("UPDATE '");
    }

    As you can see, there are a number of ways to accomplish this. It all just depends on how complex you want to make it, and what all you want to track.

    (Report comment)

Leave a Reply

Netflix, Inc.

TigerDirect