Ad Groups are a very flexible method to bundle ads. You can use them to display random ads in the frontend, run split tests, set the order in which ads appear, display ad block, but also just for informational purposes. Not only can an Ad Groups have multiple ads, but an ad can belong to multiple ad groups.
On this page you are going to learn how to use and display Ad Groups.
Setting up an Ad Group
Ad groups are for ads what categories and tags are for posts. They can be created on the edit screen of an ad using the Ad New Ad Group button.
All the other information about the ad group, e.g. the group type or the number of ads to display can only be selected on the group overview page.
Find example on the group types below.
Ads and ad weight
To assign an ad to a group visit the edit page of the ad and find the ad group metabox (on the right side). Click on the ad group you want to assign the ad to and save. Keep in mind that you can assign one ad to multiple ad groups.
On the ad group overview page you can also set the ad weight for each ad. Ad weights control the proportion of views or the order in which ads of the group are displayed.
By default, any ad assigned to an ad group has the weight of 10. Therefore, in an ad group with equal ad weights, each ad would get about the same impressions as the other.
You can disable an ad within an ad group by setting the ad weight to 0.
Ad Group Types
There are currently 2 group types:
- Random Ads: this type displays ads randomly based on the ad weight. See an example below.
- Ordered Ads: displays the ads in the order set by the ad weight option. See an example below.
Some use cases for the Random Ads ad type:
- display random ads on one place
- run split tests
- rotate ads in an ad block to decrease ad blindness
Using ad weights with Random Ads
Keep in mind that the ad weight does not influence the order in which the ads appear, but just the chance an ad could appear.
Ad weight examples
To rotate ads with the same chance to appear, give all of them the same ad weight – any number from 1 to 10.
In the next example, the chance of Ad #1 to be displayed is the same as Ad #2 and #3 together. I added percentages to make this more clear.
Some use cases for the Ordered Ads type:
- define a specific order or ads in an ad block
- define fallback ads that show up if the other ad conditions prevent the main ad from showing
Using ad weights with Ordered Ads
With Ordered Ads, the ad weight doesn’t define the proportion of the views an ad gets compared to the other ads from the same group, but the order in which it is displayed. The higher the ad weight, the higher the position in the chain.
Ad weight examples
The following ad weight example would mean that Ad #1 gets checked first. If there is only one ad to be displayed in this group and the display conditions allow the ad to be displayed, Ad #2 and #3 won’t get displayed. If the display conditions of Ad #1 return false, Ad #2 gets checked, etc. Such a setup could also be used to define fallback ads, e.g. when Ad #3 wouldn’t have any display conditions and is therefore displayed anytime when Ads #1 and #2 are not.
Display an Ad Group
You can display an ad from an ad group almost through the same options like displaying ads.
You find the ID of the ad group in the first column of the ad group overview page.
Keep in mind that displaying an ad group means there will be one ad randomly chosen from the group based on ad weight and the display conditions of each ad. The latter can cause that no ad can be displayed.
Use the following code to insert the ad group with the ID 4 into your theme:
<?php if(function_exists('the_ad_group')) the_ad_group(4); ?>
Just open the template file and include the code. The first part will guarantee that there will be no error message in case you deactivate the plugin and forgot to remove the code snippet before.
The shortcode is the easiest method to insert an ad group anywhere within a static page or a post. For our ad group with the ID 4 just use this shortcode.
Just open the post, page or any other post type with a content field and include the code.