You are here: Developers > Ad Request API > JavaScript ad tags

JavaScript ad tags

Last updated on September 21, 2015

You can add JavaScript tags (<script>) to an HTML ad requestCommunication from a web browser or app to an ad server to display an ad. to:

Note: While flexible, JavaScript tags are unforgiving if the resulting ad has bad syntax or formatting, which can negatively impact page rendering and layout.

OpenX provides the following JavaScript tools to support customizable ad requests:

  • Asynchronous JavaScript tags. Runs in parallel with the execution of the page to deliver ads to a specified ad unit.

  • Synchronous JavaScript tags. Runs in series with the execution of the page loading to deliver ads to a specified ad unit.

  • OpenX JavaScript tag library. Supports customized ad requests and simplifies how parameter values are sent to the Ad ServerA complete digital advertising platform where publishers sell, manage, and deliver their advertising inventory across all digital formats.. For example, you can use tag library methods to override certain parameters, specify fallback ads, and set third-party impression beacons for your JavaScript ad tags. The tag library is a small file downloaded to the user's browser from the following path on your delivery server: http://delivery_server_domain/w/1.0/jstag

    The jstag file provides the following JavaScript methods:

    • Instance methods. Set distinct configuration or ad request parameters for a given instantiation of an OX object.

    • Static methods. Set global configuration values and manage global data sets in the OpenX JavaScript tag library.

    Note: The OpenX JavaScript Tag Library does not support all ad request parameters. For information about what parameters each method supports, see the corresponding reference page for the specific method.

You can implement the following types of JavaScript tags:

Feedback form