DocsOAdsTargeting System
Features

Targeting System

OAdsorravo.com/docs/oads/targeting

Targeting System

All targeting is evaluated server-side in OAds_CPT::passes_targeting() before an ad is served.

Device targeting — _oads_target_device

ValueBehavior
bothAll devices (default)
mobileMobile only — uses wp_is_mobile()
desktopDesktop only

User role targeting — _oads_target_roles

Comma-separated role slugs. Special values:

  • logged_in — any authenticated user
  • logged_out — unauthenticated visitors
  • subscriber, editor, administrator — specific roles

Category targeting — _oads_target_categories

Comma-separated category IDs. Ad shows only on pages belonging to those categories (works on singular posts and category archives).

Country targeting — _oads_target_countries

Comma-separated ISO 3166-1 alpha-2 codes. OAds reads the constant or option OADS_VISITOR_COUNTRY if defined by your theme or geo-IP plugin.

Frequency cap — _oads_freq_cap

Maximum impressions per user per day. Stored in JavaScript localStorage (key: oads_fc_{ad_id}). Set to 0 to disable.

Date scheduling

  • _oads_start_dateYYYY-MM-DD, ad won't show before this date
  • _oads_end_dateYYYY-MM-DD, ad won't show after this date
Targeting System — OAds Docs — Orravo