Tip #8: Understand the banner delivery process
Why would you need to know what happens inside the OpenX ad server whenever a zone tag is called? Simple — although it’s a little bit technical, understanding the banner delivery process is essential for really getting to grips with banner delivery in OpenX, and is vital background information for a number of other topics.
Although the process below is specific to OpenX 2.8, the process in earlier versions of OpenX is very similar, although slightly less efficient. However, the general principle is the same.
The banner delivery process
It does not matter which zone tag type you use, the banner delivery process pretty much follows the same process. After some initial setup of the environment, the OpenX ad server uses the following process to determine which banner to deliver.
- Find all of the active banners1 that are linked to the zone.
- Are there any active banners linked to the zone that are from Contract (Exclusive) campaigns? If so:
- Do any of the linked Contract (Exclusive) campaign banners “fail” delivery limitations?2 If so, discard these banners.
- Are any of the linked Contract (Exclusive) campaign banners incompatible with the zone tag type?3 If so, discard these banners.
- Are there any banners remaining? If so:
- Select one of these banners via the campaign weight/banner weight process (see below).
- Log a request, using the selected banner ID and the zone ID.
- Display the banner.
- Log an impression, using the selected banner ID and the zone ID.
- If this point is reached, then there were no banners from Contract (Exclusive) campaigns that could be displayed.
- Are there any active banners linked to the zone that are from Contract campaigns? If so:
- Do any of the linked Contract campaign banners “fail” delivery limitations? If so, discard these banners.
- Are any of the linked Contract campaign banners incompatible with the zone tag type? If so, discard these banners.
- Are there any banners remaining? If so:
- Possibly select one of these banners via the Contract campaign banner selection process (see below).
- If a banner is selected:
- Log a request, using the selected banner ID and the zone ID.
- Display the banner.
- Log an impression, using the selected banner ID and the zone ID.
- If this point is reached, then there were no banners from Contract (Exclusive) campaigns that could be displayed, and there were either no banners from Contract campaigns that could be displayed or no banner from a Contract campaign was required to be shown.
- Are there any active banners linked to the zone that are from Remnant campaigns? If so:
- Do any of the linked Remnant campaign banners “fail” delivery limitations? If so, discard these banners.
- Are any of the linked Contract campaign banners incompatible with the zone tag type? If so, discard these banners.
- Are there any banners remaining? If so:
- Select one of these banners via the campaign weight/banner weight process (see below).
- Log a request, using the selected banner ID and the zone ID.
- Display the banner.
- Log an impression, using the selected banner ID and the zone ID.
- If this point is reached, then there were no banners from Contract (Exclusive) campaigns that could be displayed, there were either no banners from Contract campaigns that could be displayed or no banner from a Contract campaign was required to be shown, and there were no banners from Remnant campaigns that could be displayed.
- Is the zone set up via zone chaining to be linked to another zone? If so, re-start the process from the first step, using the new zone.
- If this point is reached, then there were no banners from Contract (Exclusive) campaigns that could be displayed, there were either no banners from Contract campaigns that could be displayed or no banner from a Contract campaign was required to be shown, there were no banners from Remnant campaigns that could be displayed, and the zone is not set up via zone chaining to be linked to another zone.
- Is a default banner configured? If so:
- Log a request, using the selected banner ID and the zone ID.
- Display the banner.
- Log an impression, using the selected banner ID and the zone ID.
- If this point is reached, then no banner can be displayed.
- Display a “blank” 1×1 .gif pixel.
Campaign weight/banner weight process
In the above process, when testing the active Contract (Exclusive) banners, or when testing the active Remnant banners, if there is more than one banner that can be delivered, one of the following processes is used to determine which banner to deliver, depending on the version of OpenX:
OpenX 2.8.1 or greater
- For every banner in the zone, find the parent campaigns.
- Sum all of the campaign weights.
- Generate a random number between 0 and the sum of the campaign weights, and use this random number to select a campaign.
- For all of the banners in this campaign that are also in the zone, sum all of the banner weights.
- Generate a random number between 0 and the sum of the banner weights, and use this random number to select a banner.
OpenX 2.8.0 or less
- For every banner in the zone, take the banner’s weight and multiply it by the campaign weight, to obtain the overall campaign/banner weight.
- Sum all of the campaign/banner weights for the banners.
- Divide each banner’s campaign/banner weight by the sum of all of the campaign/banner weights. (This ensures that the sum of the new campaign/banner weights is 1.)
- Generate a random number between 0 and 1, and use this random number to select a banner, so that banners are delivered with a distribution based on their relative campaign/banner weights.
Contract campaign banner selection process
In the above process, when testing the active Contract banners, if there is more than one banner that can be delivered, the following process is used to determine which banner to deliver:
- Look at all of the active banners in Contract campaigns that have a Priority Level of 10 (if any):
- For every banner, take the pre-calculated priority value and multiply it by the pre-calculated priority factor value.4
- Sum all of the calculated priority/priority factor values for the banners.
- Divide each banner’s priority/priority factor value by the sum of all of the priority/priority factor values. (This ensures that the sum of the new priority/priority factor values is no greater than 1.5 )
- Generate a random number between 0 and 1, and use this random number to either select a banner, or select no banner.
- If no banner is selected, then repeat the above process with all of the active banners in Contract campaigns that have a Priority Level of 9, then 8, then 7, etc. all the way down to the active banners in Contract campaigns that have a Priority Level of 1.
Variations to the impressions logging ordering
Certain zone tag types (Image, No Cookie Image, XML-RPC) do not log the impression after displaying the banner — instead, the impression is actually logged immediately after logging the request; that is, before displaying the banner. This is because with these zone tags, it is not possible to deliver a logging beacon.6
Phew!
Okay, saying at the start that it was a little bit technical may have been an understatement.
However, if you’ve at least managed to get a vague idea of how the delivery process works, The Guru promises that future articles on the OpenX ad server will make a lot more sense…
- A banner is active when it is in a campaign that currently running, and the banner has not been disabled. [↩]
- That is, if the banner was actually attempted to be delivered, would it be unable to be shown as a result of any delivery limitations or delivery capping that has been set up for the banner? [↩]
- For example, HTML banners cannot be delivered when using the Image or No Cookie Image Tags, which can only deliver image banners. [↩]
- These values come from the Maintenance Prioritization Engine. [↩]
- It is possible for the sum of the new priority/priority factor values to be less than one, if the Maintenance Prioritization Engine has determined that the Contract campaigns do not require all of the available impressions to be used in order to meet the campaign targets. [↩]
- A logging beacon is a 1×1 .gif pixel that is delivered separately from, and after, a banner, so that if the banner is not actually delivered to the user’s web page, the banner impression is not counted. [↩]
Great post – really helpful. Thank you.
Question is, when using ECPM prioritization doesn’t this change pretty significantly? It would be great to hear your thoughts/comments on how OpenX handles this kind of yield based management in the real world (beyond just their documentation).
You are correct — using eCPM changes the way that the banner selection process works. However, I have to confess that, to date, none of the clients I have worked with have really used this feature, and it’s not been on the top of my list of things to investigate, so, I do not feel that I can really comment about how the eCPM feature works in the real world! I’ve seen some reports on the OpenX forums that it’s somewhat buggy, too, so my plan was to wait for a few more releases of OpenX before testing it out.
If anyone has any actual experience of the feature in the real world, it would certainly be great to hear about it!
The new Probability technique is a bit tricky, and i can’t understand how to use it for my needs.
let’s say i have two campaigns, campaign A and campaign B – both have a banner (468A and 468B) that run on the same zone – Zone 468.
But campaign A also has a banner (728A) that runs on another zone – Zone 728, with anothr banner (728C) from another campaign – campaign C.
And campaign B also has another banner (250B) that runs on another zone – Zone 250, with anothr banner from campaign C – 250C.
all the campaigns are Remnant campaigns.
now, i want that:
on Zone 468 banner 468A will have 66% of the impressions and banner 468B will have 33%.
on Zone 728 both banners (728A and 728C) will have 50%.
on Zone 250 both banners (250B and 250C) will have 50%.
At the previous system, all i needed to do is to set all weights (banners and campaigns) to 1, beside banner 468A – that will get weight of 2.
Simple.
In 2.8.1 i need to… well i don’t know what i need to do.
If i increase campaign A weight, i will need to increase campaign C weight, and then campaign B – and we did nothing…
So, what should i do?
Hi Mor,
I think in this case, you will need to split your banners into different campaigns to achieve the different percentages of zone inventory you require.
[...] 英文原文地址:http://www.openxtips.com/2009/04/tip-8-understand-the-banner-delivery-process/ [...]
See Chinese version in OpenXChina.org