Invocation Overview

Note: This article is for an old version of OpenX.

The latest OpenX documentation can be found at the following URLs:

To place a banner on you website you need to have a piece of HTML which
retrieves a banner from the ad server and displays it. This piece of HTML is usually
called invocation code or banner code. The invocation code needs to be placed in the HTML
document in the exact location where you want to display the banner. This chapter will
help you generate the invocation code and set all the options of the different invocation
types.

The invocation code generator

Creating the invocation code manually can be very
complicated, but to help making it simpler there is a code generator available. With the
code generator you only have to specify the type of invocation and set a couple of
additional parameters.


  TIP

IMPORTANT:

Remember is to generate the invocation code twice if
you want to display two banners on the same page, even if the selection of the banners is
the same. Each invocation code has an unique identifier embedded, to help Openads keep
track of which banner is clicked on by the user.


There are two different invocation code generators;
one for direct selection and one for publishers and zones.

Publishers and zones

If you are using publishers and zones to make a
selection of the banners you want to display, you can find the invocation code generator
next to the Zone properties, Chains, Banner selection and Probability tabs. To create
your invocation code you need to go to the Invocation code tab of the zone you want to
show on your website and select the type of code you want to create, setup a couple of
additional parameters and click on Generate.

Openads Invocation: Publishers and
zones:

On the Zone properties page you can choose the type
of the zone and based on this choice Openads may let you choose different invocation
types. If the type of the zone is Banner, Button or Rectangle only normal invocation
types are available. If the type of the zone is Interstitial or Floating DHTML or Popup,
you don't have to choose an invocation type, because for each of those zone types there
is only one JavaScript based invocation type.

Direct selection

If you want to select a banner directly from your
inventory, creating this invocation code is a bit more difficult than using zones, but
the basics are the same. Just go to Direct selection page and select the type of code you
want to create, setup a couple of additional options and click on Generate. They two
differences between using zones and direct selection are two additional parameters and
the location where you can find the generator.

Openads Invocation: Direct
selection

If you choose to use the generator for direct
selection there are two additional parameters available for each invocation type. These
two parameters will be explained once below, but are available for every invocation
type.

Openads Invocation: Direct selection
parameters

Banner selection

This parameter is used to make the actual selection
from your banner inventory and contains the selection string. If you want to know more
about this parameter please read chapter Making a selection, which will explain the exact
format of the selection string in detail. If you leave this field empty all banners are
considered for delivery.

Advertiser or Campaign The optional argument is used
to limit the banner selection you made with the Banner selection parameter to a certain
client. This argument is not used by default. If you do not want to limit the delivery to
one particular advertiser or campaign you can leave this field empty.

Different types of invocation codes

Openads is a very flexible ad server and there are
different types of invocation codes you can use. There are two types we recommend for
most situations: Remote invocation for JavaScript and Local mode. There are other types
which can be useful in specific situations, but those types are disabled by default. If
you want to enable the other types of invocation codes, please read the chapter
Invocation and Delivery of the Administrator Guide.

Each type of code has its own abilities and
limitations. Please take a careful look at the overview below, before you decide which
type is most suitable for your website.

 Capabilities and
requirements
for the different types of
invocation codes

Remote invocation Remote invocation for JavaScript Remote invocation for Frames
Remote invocation using XML-RPC Local mode
Available by
default
no
yes
no
no
yes
Basic Requirements
 
Requires cookies
yes
no1) no1) no
no
Requires JavaScript
no
yes
no
no
no
Requires iframes/layers2) no
no
yes
no
no
Requires PHP powered website
no
no
no
yes
yes
Banner capabilities
 
Display regular banners
yes
yes3) yes
yes
yes
Display Flash or HTML banners
no
yes3) yes4)
yes
yes
Append popups/interstitials5)
no
yes3) yes4)
yes
yes
Block based on previous banners
no
yes
no
yes
yes
Block based on previous campaigns
no
yes
no
yes
yes
           

1) Remote Invocation for JavaScript does not require cookies to be enabled, but in case JavaScript is disabled it turns into a regular Remote Invocation code which does require cookies. The same thing applies to Remote Invocation for Frames when the browser does not support iframes or layers.

2) Remote Invocation for Frames requires that the
browser supports iframes. If you want to support Netscape 4 (which does not support
iframes) you need to manually enable the layers compatibility mode during the generation
of the invocation code.

3) Remote Invocation for JavaScript consists of two
different codes. If JavaScript is enabled in the browser this feature is supported. If
JavaScript is disabled the invocation code will turn into a regular remote invocation
code, which does not support this feature.

4) Remote Invocation for Iframes consists of two
different codes. If iframes and/or layer are supported by the browser this feature is
supported. If iframes and layers are not supported the invocation code will turn into a
regular remote invocation code, which does not support this feature.

5) This feature allows you to append a popup or
interstitial banner to a regular banner. For example, if a banner or zone which uses this
feature is displayed it will automatically display the append banner.