Link Search Menu Expand Document

PDF

Avoiding Namespace Collisions

Publishers

Last updated on January 16, 2019


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 tag (\<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 request 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.