Forum Moderators: coopster

Message Too Old, No Replies

(from "ecommerce") Is there any way for a publsher to count CPM's?

I'd like to get more of a handle on my ad revenues...

         

Josefu

9:11 am on Mar 15, 2005 (gmt 0)

10+ Year Member



=======================

If you've read around a bit you may see that I'm just beginning to seriously learn about web advertising.

Could I control how many "shows" a banner gets and turn it "off" if a certain number is exceeded? I have the idea of selling precise CPM's that would correspond exactly to the volume of visitors I have. (thus a total transparency for the client without any need to make "promises" about the volume of traffic I will have). In fact, I would like to create a "credit counter" that would not only run to zero but be "refillable" client-side... think a jukebox or... a dryer in a laundromat : )

Dumb idea? Myself I think not, but I see little written anywhere about CPM "countablility" - does the technology we have today allow this?

========================

I posted the above in the "ecommerce" board, and was sent here : )

I really get the feeling that if I want to do the above I'm going to have to "invent" something... Is there a simple way to go about this? I imagine already a table of "ad-ers" and a script to rotate the ad url and count them... lot of work.

Turbonutter

10:04 am on Mar 15, 2005 (gmt 0)

10+ Year Member



Well the best way to do it, would be to store all your banners in a database, which contains a primary key, banner filename, count and limit.


<?php

$query = mysql_query("select * from banners where count!= limit order by rand() limit 1");
if (!$bannerinfo = mysql_fetch_object($query)) {
$file = "genericsitebanner.gif";
} else {
$file = $bannerinfo->filename;
}
$fp = fopen($file, "r");
header("Content-type: image/gif");
fpassthru($fp);

if ($bannerinfo) {
mysql_query("update banners set count = count+1 where bannerid='$info->bannerid'");
}

?>

database.banners:

bannerid int(11) primary auto_index
filename varchar(255)
count int(11)
limit int(11)

jatar_k

5:26 pm on Mar 15, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Yes as Turbonutter showed, it's pretty straight up Josefu.

also take a look at phpadsnew I can't remember if it has this feature but you would think they all should.

Josefu

12:05 pm on Mar 16, 2005 (gmt 0)

10+ Year Member



Ex-act-ly guys thanks a lot - I downloaded phpAdsNew last night and it is everything I need. If it isn't there's lots enough to learn from there, but it looks like a great app.

Excuse my 'newbie' post but I had put it up after a flash of... laziness I suppose. I've just finished php'ing an entire site and had had enough... I could have figured it out myself with a bit of thought but sometimes one just... gets blocked. Sorry for wasting your time, but thanks for booting me out of my rut : )