Skip to main content
Rulesets define targeting restrictions for offers. They control which traffic is accepted based on geography, device characteristics, connection type, scheduling, and IP addresses.

Rule categories

Geotargeting: countries, regions, cities, dmas, postal_codes, mobile_carriers Device: browsers, device_types, brands, os_versions, platforms Connection: isps, connection_types Other: ips, languages, is_block_proxy, day parting settings

Common fields

Every rule entry includes:

Match type support

Geotargeting precedence

When combining geotargeting rules, more specific rules override less specific ones: City > DMA > ZIP/Postal Code > Region > Country For example, if you exclude the US but include New York City, traffic from New York City is still accepted.

Examples

The following ruleset excludes all IPs in the 10.11.12.1310.11.12.100 range as well as the single address 1.2.3.4:
Pair match_type: "maximum" with targeting_type: "exclude" to block everything up to and including a given version:
Rules of different types can be combined — the resulting ruleset accepts traffic only when every rule matches. The following ruleset accepts:
  • Devices running iOS between version 9.0 and 11.4
  • Traffic from New York City
  • Mobile connection (not Wi-Fi)
  • Not from a known proxy

Day parting

Control when an offer accepts traffic by time of day and day of week. Each entry in days_parting:

Day parting examples

Use day_parting_apply_to: "selected_timezone" with day_parting_timezone_id to schedule based on a fixed timezone regardless of the device user’s local time:

Complete ruleset reference

The following example exercises every rule type available. It’s unlikely you’d combine all of these in production, but it’s a useful reference for the full schema shape: