In OpenX, it is possible to apply capping to banners. Capping allows you to set a maximum number of times a banner will be seen by a user. This limitation can apply:
- For the browser session — that is, the limitation on the number of times a user will see the banner will apply until the user closes their web browser, at which time the capping limitation count will be re-set; or
- For all time — that is, once the user has seen the banner the number of times specified by the limitation cap, they will not see the banner again, even if they close and restart their browser.
With either type of capping, you can specify an optional time period. After this time period, the cap will be re-set, and the user will once again be able to see the banner, until the cap is reached again.
In addition to setting capping at the banner level, capping can also be applied at the campaign level. In this case, the capping is applied to the aggregate impressions for all banners in the campaign, and once the limit is reached, no banners from the campaign will be shown.
As an example, consider the banner shown below. It has been set up with a capping level of 2 impressions for all time, with a capping re-set period of 24 hours. You have already seen the banner once now, so, if you reload this page, you will see the banner for a second time — which is the limit. Should you re-load the page a second time, you will not see the banner, as you have already reached the limit of two impressions. (But if you come back tomorrow, the banner will once again show for another two impressions.)
An example banner with capping applied, set to 2 impressions every 24 hours. If you can't see this banner, then you have either already seen this banner twice in the last 24 hours, or you have cookies disabled,
or this is your very first visit ever to this website.
 The delivery capping options set for the above example banner.
With regards to the above example banner, no guaranteed delivery banner has been included in the zone being displayed, which is why no banner appears once you have reached the 2 impression limit per 24 hours. This highlights why, in a real-world OpenX setup, you should always have a guaranteed delivery banner in every zone.
Why use capping?
Capping banners is not for everyone. Indeed, it makes little sense to apply capping to banners that are there to simply take up unsold inventory.
However, it is widely believed that as the number of times a user has seen a banner increases, the likelihood of that user clicking on the banner decreases. As a result, if you are running CPC or CPA campaigns, you may find that you will make better use of your inventory by applying capping, so that you don’t show the banners to these users too many times — and once the capping limits have been reached for a given user, then you can show the user the lower earning CPM campaigns.
One important thing to note about banners with delivery caps applied is that they are managed using cookies. If OpenX cannot set cookies, then banners with delivery capping applied will never be shown. This is because, if capped banners were shown to users who had cookies disabled, then these users would be able to see capped campaigns infinitely. For cases where you have actually sold inventory on a capped basis, this would obviously be very bad — which is why OpenX does not do it.
However, this does mean that on the very first visit a user ever makes to your site, OpenX will not yet know if it can set a cookie or not. As a result, on this very first ever impression, OpenX will not deliver a capped banner. It will wait until the second impression to do so, when it can then be sure if it was able to set a cookie from the first impression. This may be important, if you absolutely require that a certain banner be shown to all users on their first visit to your site — in this case, you will need to use an uncapped banner.
One of the least understood configuration options in OpenX is the “Operation Interval” setting. What is it, and what does it do?
 Operation Interval in the Maintenance Settings
The first and foremost thing to know about the Operation Interval is that it is not a means of changing how often statistics will be updated in the user interface. OpenX, no matter what version you have installed, will only ever update the statistics in the user interface once per hour. That is it — end of story, end of discussion. Changing the Operation Interval to a value less than 60 minutes will not change this, and if you modify the Operation Interval setting expecting this to be the case, then you will be sorely disappointed.
So, if this is the case, what is the Operation Interval?
The Operation Interval is the mechanism by which OpenX performs internal statistics data aggregation and is the basis on which priority calculations are performed. That is:
- Statistics data is logged based on the Operation Interval (for OpenX 2.8, anyway);
- Statistics data is summarized and stored based on the Operation Interval; and
- Priority values for Contract Campaigns are calculated on the basis of the Operation Interval.
So, given that the Operation Interval is something that only relates to OpenX’s internal operations, why would you want to change it?
To answer this question, you need to understand the two effects that reducing the Operation Interval from the default value of 60 minutes has. (The Operation Interval can only be set to 5, 10, 15, 20, 30 or 60 minutes.)
Firstly, because data aggregation is performed using the Operation Interval value, if you reduce the value from the default of 60 minutes, then OpenX will need to store more data rows. This is because if the Operation Interval is reduced, then there are more Operation Intervals per hour, which means there will be less data aggregation based on the Operation Interval, and so more data rows that need to be stored. As the Operation Interval is the basis by which data is summarized and stored in the “data_intermediate_%” and “data_summary_%” tables in OpenX, which account for most of the database size, then you can expect that an OpenX installation with an Operation Interval of 30 minutes would require twice the database storage as an equivalent OpenX installation with an Operation Interval of 60 minutes.
Secondly, because the maintenance process which calculates Contract Campaign priority values does so on the basis of the Operation Interval, if you reduce the value from the default of 60 minutes, then the OpenX maintenance process will be required to perform more work to calculate the priorities. This is because the maintenance script calculates a priority for every active banner/zone link in the system for every Operation Interval, so if the Operation Interval is reduced, then there are more Operation Intervals per hour, which means there are more priority values to be calculated. The part of the maintenance script that calculates priorities for Contract Campaigns would be expected to take at least twice as long to run on an OpenX installation with an Operation Interval of 30 minutes than on an equivalent system with an Operation Interval of 60 minutes.
So, given the increase in database size and the decrease in performance of the maintenance script that comes with reducing the Operation Interval value, why would you ever change the Operation Interval from the default value of 60 minutes?
The answer is that if you run a very high end OpenX installation, having the Contract Campaign priority values updated only once per hour may sometimes not be enough, and you really do need these priority values updated every half an hour, or every 15 minutes, or maybe every 5 minutes. Be aware, though, that you will need some seriously expensive hardware if you expect to be able to run a large OpenX installation with an Operation Interval of 5 minutes.
Of course, if you do change the Operation Interval value, don’t forget:
- You need to update your system crontab so that the maintenance script is run once (and only once) per Operation Interval. There’s no point in setting your Operation Interval to 30 minutes, so that Contract Campaign priorities can be updated more often, and then not running the maintenance script every Operation Interval to do so!
- You should review your banner delivery cache setting, as there is no point in calculating the Contract Campaign priorities more often, only to have these values ignored due to a long cache value.
Finally, it is worth noting that if you don’t actually run any Contract Campaigns, then there is no point in reducing the Operation Interval from the default of 60 minutes, as there will be no benefit for you at all in this situation!
The OpenX ad server‘s Maintenance Prioritization Engine (MPE) calculates priorities for banners in Contract campaigns. (OpenX’s Contract (Exclusive) and Remnant campaign types have their banners delivered based on relative campaign weights and banner weights.)
However, if you read the fine print about how the MPE works, you may notice that every zone in OpenX has a default zone impression forecast — that is, OpenX assumes that, until it is able to learn what kind of inventory is available in a zone, that it has this number of impressions per hour.
This means that if you create a zone in OpenX, but don’t actually generate its zone tag and put it on your web site (which in turn means that OpenX will never see any requests for banners in the zone), then the OpenX ad server will continue to assume that this zone has the default number of impressions/hour.
While this might not seem like a big deal, consider this: the default is 1,000 impressions/hour. If you link a campaign to just one such “inactive” zone, then the OpenX ad server will think that there are 24,000 more impressions available per day than there really are. That’s a lot of impressions — and the more inactive zones you link your campaigns to, the more of these incorrectly assumed impressions will exist!
This will cause your Contract campaigns to under-deliver.
As a result, you should never link your campaigns or banners to zones that are inactive.
The Guru was browsing through a list of old links the other day, and came across an article on optimizing MySQL’s InnoDB storage engine. It’s definitely worth a read if you’ve never seen it before, but if you’re just after the high level summary:
- Add more memory to your server. Memory is good.
- If you have lots of memory, don’t forget that you should be running a 64-bit O/S, with the 64-bit version of MySQL, if you are going to be able to utilize that memory!
- The OpenX ad server is a write intensive application, so RAID-5 is bad. Very, very bad. Use RAID 0, or RAID 10.
- Tune your InnoDB settings. Remember, tuning is a process of measurement, followed by making a change, and then re-measuring.
If you’re a small website publisher, and you run your own OpenX ad server on the same server as your website, then you know that when your server goes down, everything stops. That’s just a fact of life for small website publishers, and there’s not much you can to but get your server back up and running as soon as possible.
However, if you are lucky enough to have seen your site grow up over time, or you work for a company that has a large site, you may be in a position where you run OpenX on a server that is different to the one that runs your website. (If you use the OpenX Hosted service, then you’re in the same situation — OpenX is running on a server that is different to the one that runs your website.)
If this is the case, then there is a possibility that the OpenX ad server system might go down, but your website server will still be up and running.
If this has ever happened to you, then you will know that this matters — and not just because your banners will not display. It can actually be a major issue because if the OpenX ad server is down, then your website may “hang” when it gets to the part of the site where a banner should be displayed. This is bad news for your users, because they won’t be able to view your website properly.
Below is the complete list of OpenX’s different zone tag types, and their susceptibility to this problem:
- Singe Page Call: Susceptible.
- Javascript: Susceptible.
- iframe: Not susceptible.
- Interstitial or Floating DHTML: Susceptible.
- Image: Not susceptible.
- No Cookie Image: Not susceptible.
- Popup: Susceptible.
- XML-RPC: Susceptible.
In all of the above cases, remember, the zone tags that are susceptible will cause your website to hang at the point where the tag is located in your site’s HTML during loading, so that your users won’t be able to see the entire page without some kind of delay. This means that it’s got nothing to do with whether banners load or not, as in all cases, if your OpenX ad server is not responding, you won’t get any banners displayed.
So, if you have an OpenX ad server in use that doesn’t live on the same server as your website, what can you do to protect yourself from this situation?
Use a tag type that is not susceptible to the hanging page problem
As you may be aware, the Single Page Call and the Javascript zone tags provide advanced features that are not available in other tag types, just as supporting companion positioning, and the ability to avoid duplicating banners, etc. Assuming that you don’t need these features, then simply using the iframe or Image zone tag types makes sense.
End place tags & position with CSS
Assuming that you would like the advanced features of the Single Page Call or Javascript zone tags, then it is possible to avoid hanging issues by placing the tags at the very end of your page’s HTML, and then positioning the banners on the page via CSS.
For example, here’s how you might place a Single Page Call tag at the end of a page, and position the banner via CSS:
...
<p>End of HTML page!</p>
<!-- Generated by OpenX 2.8.1 -->
<script type='text/javascript'
src='http://www.example.com/openx/www/delivery/spcjs.php?id=1'>
</script>
<div style="position: absolute; top: 10px; right: 10px;">
<script type='text/javascript'><!--// <![CDATA[
/* [id1] Website 1 - Zone 1 */
OA_show(1);
// ]]> --></script><noscript><a target='_blank'
href='http://www.example.com/openx/www/delivery/ck.php?n=f1bb21f'>
<img border='0' alt=''
src='http://www.example.com/openx/www/delivery/avw.php?zoneid=1&n=f1bb21f'
/></a>
</noscript>
</div>
</body>
</html>
There are many ways of CSS positioning, of course. Use whatever method suits you best!
Disadvantages
It is worth mentioning that is you do decide to use end placement of tags and position with CSS, this means that your banners will be the very last items to load on your web page. This means that you may find that you have a reduced number of impressions, as a result of users “navigating away” from the page before the banners have loaded; this in turn may result in reduced income (either through fewer impressions for CPM campaigns, or through fewer clicks/conversions for CPC/CPA campaigns).
However, this is something you will need to make a judgement call on — is it better to sacrifice a little income to ensure that your users can view your website immediately, albeit without banners, in the event that your external OpenX ad server has a problem; or is it better that if your OpenX ad server goes down, your website is not accessible?
Modify the OpenX tags
Finally, if you really want to get creative, you can modify the OpenX tags. This is for advanced users only, though. Best of luck!
|
Unofficial Hosted Issue List Ask The Guru Got an OpenX problem The Guru hasn't written a tip about yet? Got an idea for a tip? Email: theguru@openxtips.com.
|