How do you build an Oa_zones array in to utitlize OpenX full page invocation in Rails?

Posted by johnml on Stack Overflow See other posts from Stack Overflow or by johnml
Published on 2010-03-17T20:12:40Z Indexed on 2010/03/18 9:41 UTC
Read the original article Hit count: 319

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about ruby-on-rails