Advanced science. Smarter decisions. Superior monetization.

Invocation code

The Zones > Invocation Code tab is where ad tags are generated. These tags are then pasted into HTML pages which invoke (call) OpenX to deliver ads.
The types of tage available depend on the type of zone you have defined. The tag types (listed in order of popularity) are:

  • JavaScript Tag: the most popular and versatile tag type (includes a noscript option for the very small number of users that are not JavaScript-enabled).
  • Local Mode Tag: enables server-side processing for banners that are stored locally, e.g. to change the site template when a user clicks on an ad.
    This tag works only when OpenX and the site calling the code are on the same physical machine. The website must be written in PHP, or be able to parse PHP.
  • XML-RPC Tag: similar to the local mode tag, but can be used for ads stored on a remote server.
  • iFrame Tag: this tag permits an ad to be imbedded in an iFrame on a web page.
  • Image Tag: useful if you want to display banners to an audience that is not JavaScript-enabled. Width and height attributes are not defined in this tag.
    If you want to allocate space for an ad before it is displayed then this information must be added directly into the tag.
  • No Cookie Image Tag: this image tag does not use cookies. This tag is used by email zone types because most email servers do not support the use of cookies.

Depending on the zone and banner(s) you are currently working with, the dropdown menu will contain combinations from the list above (unless you are generating a No Cookie Image Tag,
in which case only the Bannercode will display):

zones_invocation_code_1.png

When you select the tag type, you can set various optional parameters in the Tag settings section of the page which change the bannercode for your zone.
These parameters vary depending on the type of zone and the type of zone tag you use. The following table describes these parameters and which tags use them.

Note: If a tag is not available in the dropdown menu it is possible that the system administrator has disabled this tag type for the server.
Contact your administrator for more information.

parameter description used by which tag types?
Target frame This value sets the HTML TARGET attribute in the bannercode. The Default option opens the target page in a new browser tab, or you can change it to open in a new window or in the same window. All
Source Enter a source value if you want to limit banner delivery based on source, such as 'music' or 'construction'.
See also: Banner delivery limitations.
All
Support 3rd party server clicktracking Use this setting to track clicks in OpenX for ads served on an external ad server.
See also: the 3rd Party Click Tracking [llink: http://www.openx.org/docs/2.4/whitepapers/3rd-party-click-tracking\] white paper.
All
Insert cache-busting code JavaScript tags automatically insert a random number into the invocation code to ensure that an earlier banner is not delivered from the browser cache. With all other tags, to avoid ad caching, you must enter this manually into the tag and tick Yes. All
Include comments Removing comments from the bannercode reduces the amount of code in your web pages. However, before you remove comments review them carefully as they contain important information about the code. After you have set and reviewed the comments for all optional parameters you can then tick No to remove them. All
Show text below banner Tick Yes if you want to display text below a banner. Enter this text in the Banners page. JavaScript, local mode, XML-RPC
Don't show the banner again on the same page. Tick Yes if you do not want to show the banner again on this page view. JavaScript, local mode, XML-RPC
Don't show a banner from the same campaign again on the same page. Tick Yes if you do not want to show any other banner from this campaign on this page view. JavaScript, local mode, XML-RPC
Store the banner inside a variable so it can be used in a template This option enables you to use local mode to display banners in site templates. If you tick No and use a site template, the banner will display before the rest of the page loads. local mode
Host language PHP must be running on the remote host. XML-RPC
Use HTTPS to contact XML-RPC Server Tick Yes if you want to connect to a secure server using HTTPS. XML-RPC
XML-RPC timeout (seconds) Set the number of seconds to wait for a response from the server. XML-RPC
Refresh after To automatically refresh a banner, specify the number of seconds between each reload. After each refresh, a new banner from your zone is displayed. iFrame
Resize iframe to banner dimensions This option is only available if your website and OpenX are on the same top level domain. In this case, it is possible to show banners of different sizes in a zone and the iFrame will resize to fit.
Note: Enabling this option may cause security alerts in modern browsers.
iFrame
Make the iFrame transparent This option works only with Internet Explorer 5.5 or higher. iFrame
Include Netscape 4 compatible iLayer Because the Netscape 4 iLayer does not work well with tables, do not place the banner in a table cell if you are using this option. iFrame
Include code to track Google AdSense clicks Tick No if you do not want to track these clicks. iFrame