NYCPHP Meetup

NYPHP.org

[nycphp-talk] Bnner Rotation

inforequest 1j0lkq002 at sneakemail.com
Mon Mar 6 15:39:29 EST 2006


Odra Gola odragola-at-gmail.com |nyphp dev/internal group use| wrote:

> Hello,
> This is a logic issue and may be considered Off-Topic, but since I'm 
> using PHP for this project and I know this list is full of very smart 
> people, there is no better place to ask for help.
>
> I have a page where three *different* banners ads should be displayed. 
> I have a pool of tens of banner ads from which the 3 banners should be 
> picked.  Each banner in the pool has a *weight* value which indicates 
> how often a banner should be displayed relatively to other banners 
> within a period of one month  (i.e. a banner with weight = 2 should be 
> displayed twice as often as a banner with weight = 1).
> The set of three banners to be displayed should be rotated every hour 
> (cron job). The amount of impressions is not important.  The banners 
> in the pool and their weight values will be changed manually every month.
>
> Well this is how it should work. However I'm not too sure how to come 
> up with an algorithm that will perform the hourly rotations.
> I usually try to solve all my problems myself, but this time I have 2 
> other deadlines by the end of today, I have a flu and this thing must 
> be ready by Wednesday morning.
> The stress and the sickness screw with my head and I can't come up 
> with any logical solutions.
>
> Any suggestions and help are greatly appreciated!
> Cheers,
> Olaf
>
While you are waiting for the smart people to finish cogetating, I will 
offer some thoughts.

I would need to be sure of how the performance data may be interpreted 
after the fact before choosing the algo. Usually analytics are used 
later and if they are used on this type of data (where you may have 
biased the randomization with your selection process) the analytics will 
be screwed up and nobody will know (except you and everyon eon the NYPHP 
list, perhaps). You might look at phpAdsNew, which is very good, but if 
this is your first foray into agency-style ad serving it might be more 
than a mouthful at this time.

You also have to be mindful of the client expectation, since random 
banner selection may allow chance to show a banner more frequently than 
your weighting system suggests it should. Usually the weighting is a 
specification, and may have bounds of acceptable rates.Will that cause 
any ruffled feathers? Since you say "a banner with weight = 2 should be 
displayed twice as often as a banner with weight = 1 (over the month)" 
but you also say " The amount of impressions is not important" I am not 
sure how you should impose your weights.. perhaps you mean impressions 
per 3 hours are not important? Are you sure... meaning you will never 
have to go back and "catch up" if an ad was underpresented? No need to 
round out the use of ad inventory? Single server; no need to collate 
data prior to setting next period rotation weights?

Once you pick an algo, you might  put the appropriate disclaimers to 
management (hand management a full disclosure of the 
randomization/selection process you used) so you can forget about the 
what-ifs. If they are actually thinking that they provided enough of  a 
spec to you that they can run some optimization test on the resulting 
performance data, that might make them pass your design off to the 
optimization consultant for the ok.

Knowing nothing else, I would pre-generate the array of ad_ID's to show 
for N days (default N=30) and each hour within and then simply tick 
through them as needed. Progress of time then defines your status within 
the rotation and nothing else... everything is 
measureable/quanifiable/checkable and the array can even be swapped out 
mid-stream if necessary using post-hoc analysis. I have very little 
faith in "management" sticking to such specifications as "it won't 
change within the month" ;-) especially if your systemis expected to 
scale up.

Hope there's some help in there and not just worries....

-=john andrews
http://www.seo-fun.com




More information about the talk mailing list