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: 317
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:
- 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.
- Output full page invocation link ie.
delivery/spcjs.php?id=1&block=1
- 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