DocsOAdsAd Groups & Rotation
Features

Ad Groups & Rotation

OAdsorravo.com/docs/oads/ad-groups-rotation

Ad Groups & Rotation

Groups pool multiple ads and serve them according to a rotation policy.

Rotation types

TypeBehavior
Random (Weighted)Each ad drawn randomly, weighted by _oads_weight. Weight 3 is 3× more likely than weight 1.
Round-robinStrict sequence. Pointer stored in oads_group_rr_pointers option.
A/B SplitWeighted random until any variant reaches 100+ impressions, then OAds_Groups::maybe_pick_winner() compares CTR and locks the winner.

Setting up a group

  1. OAds → Ad Groups → New Group
  2. Set rotation type
  3. In each ad editor, set Ad Group field to this group
  4. Set Weight (1–10) per ad for weighted rotation
  5. Use [oads] normally — the group logic picks the ad

OAds_Groups PHP API

phpOAds_Groups::get_all(): array
OAds_Groups::get_by_id( int $id ): ?object
OAds_Groups::get_ads_in_group( int $group_id ): array
OAds_Groups::pick_ad( int $group_id ): ?WP_Post
OAds_Groups::maybe_pick_winner( int $group_id ): void
OAds_Groups::save( array $data ): int|false
OAds_Groups::delete( int $id ): bool
Ad Groups & Rotation — OAds Docs — Orravo