Avoiding namespace collisions

To avoid namespace collisions between the OX object (named OX) and other JavaScript objects with the same name, OpenX supports the oxns (OpenX namespace) parameter. For all tag implementations, you can manually add the oxns parameter to the request to fetch the tag library in your 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. (<script src="http://delivery_server_domain/w/1.0/jstag"></script>). When implemented, OpenX renames the OpenX object with the value of the oxns parameter appended to OX_. For example, if your ad requestCommunication from a web browser or app to an ad server to display an ad. passes the following request to load the tag library:

<script src="http://delivery_server_domain/w/1.0/jstag?oxns=mycompany"></script>

Then the name of the OX object changes to OX_mycompany. For all JavaScript tag implementations except standalone asynchronous or synchronous tags, you need to manually update all JavaScript references to OX with the new name. For example, you need to change references to OX.frameCreatives(true) to OX_mycompany.frameCreatives(true). In addition, if the JavaScript tag is linked multiple times on a page, you need to add the same oxns parameter to each one.

The oxns parameter is restricted to alphanumeric values, including a combination of letters, numbers, or the underscore character ( _ ). If the value is empty or contains illegal characters, the default OX is used.