Custom Variables in Ad Requests
Last updated on August 21, 2015
You can include custom variables to provide additional information about your ad space if available ad request parameters do not meet your needs.
Each custom variable is expressed as a key-value pair (KVP) and must meet the following requirements:
To distinguish it from other types of ad request parameters, custom KVPs must be prefixed with the
c.namespace. For example:
topicis the key and
sportsis the value)
Expressed using the following characters:
.(period) If you need to use reserved characters in your values, you can use percent-encoding (express them as a pair of hexadecimal digits derived from the character’s ASCII byte value and prefixed with
%). For example, to include an exclamation point (
Uppercase letters in KVPs do not result in an error, but OpenX converts them to lowercase values. Therefore, only KVPs passed as lowercase characters will match line item targeting—even if entered with uppercase letters via the UI.
Multiple values for a single key must be separated by a comma (
,). For example:
c.age=30,40,50. Alternatively, specify multiple instances, such as:
Multiple KVPs must be separated by an ampersand (
&). For example:
Keys are limited to 20 characters.
Values are limited to 255 characters for each value. For multiple values of a single key, the sum of all of the values cannot exceed the 255 characters.