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!