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:| Field | Values | Description |
|---|---|---|
targeting_type | include, exclude | Whether to allow or block matching traffic. |
match_type | exact, minimum, maximum, range | How the value is compared. |
Match type support
| Match type | Supported by |
|---|---|
exact | countries, regions, cities, dmas, postal_codes, mobile_carriers, browsers, device_types, brands, platforms, ips |
minimum | os_versions |
maximum | os_versions |
range | ips |
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
Empty ruleset (all traffic allowed)
Empty ruleset (all traffic allowed)
Single country targeting
Single country targeting
OS version range (iOS 12.0+)
OS version range (iOS 12.0+)
IP exclusion range
IP exclusion range
The following ruleset excludes all IPs in the
10.11.12.13–10.11.12.100 range as well as the single address 1.2.3.4:OS version ceiling (exclude Android 7.0 and below)
OS version ceiling (exclude Android 7.0 and below)
Pair
match_type: "maximum" with targeting_type: "exclude" to block everything up to and including a given version:Combining multiple rules
Combining multiple rules
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.| Field | Type | Description |
|---|---|---|
is_use_day_parting | boolean | Enable day parting. |
day_parting_apply_to | string | user_timezone or selected_timezone. |
day_parting_timezone_id | integer | Timezone ID (when using selected_timezone). |
days_parting | array | Time windows per day. |
days_parting:
| Field | Type | Description |
|---|---|---|
day_of_week | integer | 0 = Sunday, 1 = Monday, …, 6 = Saturday. |
start_hour | integer | Start hour (0–23). |
start_minute | integer | Start minute (0–59). |
end_hour | integer | End hour (0–23). |
end_minute | integer | End minute (0–59). |
Day parting examples
Mon–Thu, 9AM–6PM user timezone
Mon–Thu, 9AM–6PM user timezone
Saturday noon–2PM UTC (fixed timezone)
Saturday noon–2PM UTC (fixed timezone)
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
Full schema — every rule type populated
Full schema — every rule type populated
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:
