You are here: Developers > Ad Request API > Javascript ad tags > OX static methods

OX static methods

Last updated on June 5, 2015

There is one global OX object per page. Use OX static methods to set global configuration values or to manage global data sets in the OpenX JavaScript tag library.

Tip: The responses for these OX static methods are all void operations.

OX static methods

Method name Description Recommended placement in HTML source Order
addVariable Specify a key-value pair to add to all ad requests for the current page view. Header Before requestAd
frameCreatives Determine if creatives returned by that instance are framed (true). If not set, use the default provided by the OX object instance. Body Before requestAd
load Asynchronously request an ad for the ad unitThe smallest inventory component that represents the space on a site where ads display. and display it in the appropriate ad space. Body Before recordAction
recordAction Track conversions. Body N/A
recordSegments Assign users to or remove them from audience segments. Body N/A
requestAd Invoke a single ad requestCommunication from a web browser or app to an ad server to display an ad. without the setup and use of an OX object. It fetches the ad for the ad unit and displays it in the appropriate ad space. Body Before recordAction
setGateway Set the base URL for the ad gateway for all instances of an ad tagA small piece of code that defines the ad space where ads display on a website. It includes parameters that describe the inventory advertising campaigns can target, which may in turn display ads in the ad space. in the given document. Header Before requestAd
setRefererURL Indicates the referring URL for the current page view. Header Before requestAd

Feedback form