Blazing Fast Ads, Don’t Let OpenX Slow You Down
If you serve your own advertisements using OpenX you are among the growing number of people that have taken control of their own ad serving platform. I have been using it on clients sites as well as my own sites for several years and have no plans of changing to any other system, OpenX has worked very well for me on small sites as well as high volume sites with thousands of ads.
What many people don’t know however is that by default OpenX wastes resources and slows down the loading of your pages and in some instances can cause your page load times to be so terrible that people will just move on to another site. I should clarify this a bit, it’s not the fault of OpenX as they do make available the option to rectify this, but its not a default thing and many people never look any further than the quickest and easiest way to serve your ads on your site.
If you install OpenX on your own server, you will likely be using a bit of code in each ad location that looks something like this:
<script type='text/javascript'><!--//<![CDATA[
var m3_u = (location.protocol=='https:'?'https://example.com/openx/www/delivery/ajs.php':
'http://example.com/openx/www/delivery/ajs.php');
var m3_r = Math.floor(Math.random()*99999999999);
if (!document.MAX_used) document.MAX_used = ',';
document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
document.write ("?zoneid=11");
document.write ('&cb=' + m3_r);
if (document.MAX_used != ',') document.write ("&exclude=" + document.MAX_used);
document.write (document.charset ? '&charset='+document.charset : (document.characterSet ? '&charset='+document.characterSet : ''));
document.write ("&loc=" + escape(window.location));
if (document.referrer) document.write ("&referer=" + escape(document.referrer));
if (document.context) document.write ("&context=" + escape(document.context));
if (document.mmm_fo) document.write ("&mmm_fo=1");
document.write ("'><\/scr"+"ipt>");
//]]>--></script><noscript><a href='http://example.com/openx/www/delivery/ck.php?n=a3832040&cb=132354835318351' target='_blank'><img src='http://example.com/openx/www/delivery/avw.php?zoneid=11&cb=554851354385368516846843&n=a3832040' border='0' alt='' /></a></noscript>
While this will work just fine, it’s not ideal as every single ad you serve has to be called from your server one at a time, if you have 10 125×125 ad banners in your sidebar, a banner in your header and 2 or 3 other ad placements on your site using this format can have a dramatic impact on your overall site performance.
Don’t worry though, its easy to do it the right way. OpenX offers an option to include your advertisements using what they call “single page call” serving. What this basically does is put one javascript code in your header to make it available on all pages and you simply insert a small invocation code for each ad position, doing it this way all the ads for the page are called from OpenX at once, reducing server load and speeding up the loading time of your page dramatically.
So, just what is the “official” definition of single page call, well according to OpenX Single Page Call is an invocation tag which can help reduce the load on your server and deliver ads faster. The single page call ad tag uses a JavaScript invocation method to make one HTTP request no matter how many creatives are being displayed on a page, rather than each request being made sequentially and slowing down your page load times.
The invocation code for single page call is handled at the website level within your OpenX installation, simply log into your admin section and click on Inventory, then websites and select the site you want to implement this on. Once you click on the site you want (if you have more than one there) you will see a row of tabs across the top, simply click where it says “invocation code” and select the options as you would normally and click generate.
Once generated you will be looking at a page containing all the codes for the zones you have set up for that site, it breaks them down by number and even shows you a box simulating the size and shape of the ad in that zone.
In order to implement this method of ad delivery you must insert a piece of code to your header that looks like this:
<script type='text/javascript' src='http://example.com/ads/www/delivery/spcjs.php?id=1&blockcampaign=1'></script>
Then you insert the individual code for each zone in their respective locations, these codes will look something like this:
<script type='text/javascript'><!--// <![CDATA[ OA_show(1); // ]]> --></script>
As you can see, this isn’t a terribly difficult process and the benefits can be dramatic. If you are using OpenX I strongly encourage you to use this method if you aren’t already. Any questions or comments, you know what to do.
-
Francine
-
Jesse
-
jal
-
Claude
-
Jesse
-
Claude
-
Jesse