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 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.