How Revive Adserver evaluates the order of delivery limitations.
When more than one delivery limitation is in use, both AND and OR options can be used to affect the order that delivery limitations are evaluated.
Operator Precedence
Revive Adserver supports numerous delivery limitations for banners:
Whenever more than one delivery limitation is used for a single banner, it is possible to use either the logical AND or OR option to define how the delivery limitations are applied. For example:
Revive Adserver's logical operators are applied in the same order as PHP applies the && and || operators - that is, AND takes precedence over OR.
So, for the above example, this means that the banner will deliver if:
- The client browser is any version of Internet Explorer
- OR
- The client language is English AND the day of the week is a weekday.
Non-Trivial Ordering
The fact that Revive Adserver applies the AND and OR logical operators in the same order as PHP means that it is non-trivial to apply the logical operators in reverse order. For example, say that the desire is to deliver a banner when:
- The client browser is any version of Internet Explorer OR the client language is English
- AND
- The day of the week is a weekday.
In this case, a potential solution is to duplicate one of the limitations:
This is evaluated as:
- The client browser is any version of Internet Explorer AND the day of the week is a weekday
- OR
- The client language is English AND the day of the week is a weekday.
This is, logically, the same as the original requirement, but expressed in a slightly more complex way.
Targeting Channels
While duplication of delivery limitations is a potential solution to altering the default precedence ordering of limitations, this can quickly become complex and difficult to understand if there are more than just a few limitations.
In this case, it generally becomes far simpler to use targeting channels.
Revive Adserver evaluates each targeting channel as an independent unit of limitations. Therefore, it would be possible to create a targeting channel called "Internet Explorer OR English" (for example), with the following limitations:
- The client browser is any version of Internet Explorer OR the client language is English
This targeting channel could then be combined with the other limitation:
- Internet Explorer OR English (Targeting Channel)
- AND
- The day of the week is a weekday.
Revive Adserver will, in this case, firstly evaluate the targeting channel, and determine if the browser is Internet Explorer, OR if the client language is English. If either one of these is true, then the targeting channel will be considered as okay, and Revive Adserver will then evaluate if it is a weekday. Again, if so, then both limitations (the channel and the day of the week) will be valid, so the banner will deliver.
In this case, the use of the targeting channel has meant that the OR operator has effectively been applied (within the targeting channel) first, and then the result is then effectively applied with the AND operator - which is the reverse of the default operator precedence that would have otherwise been applied without the targeting channel.