views:

87

answers:

1

I'm serving ads using OpenX within Rails. To correctly use the OpenX full page invocation you need to set Oa_zones[] array, otherwise all available ads are requested (but will never be used).

These are the necessary pieces:

  1. Build an array of zones. Ideally zones could be added in any partial, so working with this array needs to be accessible throughout the view.
  2. Output full page invocation link ie. delivery/spcjs.php?id=1&block=1
  3. Output zones

The problem is, the full page invocation script can't be loaded until the zone array is built (and instantiated in JavaScript). At the same time, the zone array can't be built until the entire view has been rendered.

+1  A: 

http://blog.openx.org/12/faster-page-load-times-happier-users/

There is an End Of Page (eop) example there - it could be modified to use the SPC method. This would allow you to output all ad-related content last, and then re-position the banner Output into the correct spots

  • Arlen
Arlen Coupland