AI-generated Key Takeaways
-
An AdRule contains data used by the ad server to generate a playlist of video ads.
-
Each AdRule has a unique ID assigned by Google and a required unique name with a maximum length of 255 characters.
-
AdRules have a required priority between 1 and 1000, where 1 is the highest priority, and changing a rule's priority affects others.
-
Required attributes for an AdRule include targeting criteria, a start date and time (which must be in the future for new rules), and either an end date and time or an
unlimitedEndDateTimeset to true. -
AdRules have a read-only status that defaults to INACTIVE and optional frequency cap behavior settings including maximum impressions per stream and per pod.
-
Each AdRule requires definitions for preroll, midroll, and postroll ad slots, which can be one of several types like NoPoddingAdRuleSlot or OptimizedPoddingAdRuleSlot.
An AdRule contains data that the ad server will use to generate a playlist of video ads.
- Namespace
-
https://www.google.com/apis/ads/publisher/v202502
Field |
|
|---|---|
|
The unique ID of the AdRule. This value is readonly and is assigned by Google. |
|
The unique name of the AdRule. This attribute is required to create an ad rule and has a maximum length of 255 characters. |
|
The priority of the AdRule. This attribute is required and can range from 1 to 1000, with 1 being the highest possible priority. Changing an ad rule's priority can affect the priorities of other ad rules. For example, increasing an ad rule's priority from 5 to 1 will shift the ad rules that were previously in priority positions 1 through 4 down one. |
|
The targeting criteria of the AdRule. This attribute is required. |
|
This AdRule object's start date and time. This attribute is required and must be a date in the future for new ad rules. |
|
Specifies whether to start using the AdRule right away, in an hour, etc. This attribute is optional and defaults to StartDateTimeType.USE_START_DATE_TIME. Enumerations
|
|
This AdRule object's end date and time. This attribute is required unless |
|
Specifies whether the AdRule has an end time. This attribute is optional and defaults to false. |
|
The AdRuleStatus of the ad rule. This attribute is read-only and defaults to AdRuleStatus.INACTIVE. Enumerations
|
|
The FrequencyCapBehavior of the AdRule. This attribute is optional and defaults to FrequencyCapBehavior.DEFER. Enumerations
|
|
This AdRule object's frequency cap for the maximum impressions per stream. This attribute is optional and defaults to 0. |
|
This AdRule object's frequency cap for the maximum impressions per pod. This attribute is optional and defaults to 0. |
|
This AdRule object's pre-roll slot. This attribute is required. |
|
This AdRule object's mid-roll slot. This attribute is required. |
|
This AdRule object's post-roll slot. This attribute is required. |