Get started with DFP Video ad rules
Video ad rules are not supported everywhere. They require the use of the IMA SDK 3. Earlier versions of the SDK do not support ad rules. Learn more about supported environments in the developer documentation.
Ad rules define how ads display with your video content. You can create ad rules to determine when ads play in a video or during a session (across multiple video streams), for how long, and as a result of which triggers. Depending on the type of ad rule you create, you can also target ad rules so that they apply to:
- Specific videos, such as all episodes of a particular TV show
- Video metadata, such as videos in the "sports" genre
- User geography
- User browser
- Keys and values that you define
Ad rules enable you to create and manage ad rules in DFP, rather than coding them manually in your video player.
How video ad rules work
When you sync a video content source with DFP, the source provides information about the video (content metadata). In addition to information like category, keywords, and duration, the metadata specifies cue points within the content. Cue points are places in the video when ads might show.
Video ad rule types
DFP allows you to create two different types of video ad rules. Standard ad rules apply to a single stream of content. Session ad rules apply to a user's entire visit to your content. They can be applied across multiple content streams, and multiple sites within your network, until a visitor leaves.
Session ad rules and standard ad rules cannot apply to the same video request. If both a session and standard ad rule is eligible for a video ad request, the higher priority rule applies.
Standard ad rules
Standard ad rules can define which cue points will contain ads, how long the ad breaks in the cue points should last, what type of ad formats should appear in the cue points, and what the source of the ads should be. In the absence of cue points, ad rules can define when in the video ads should appear.
You want to show two 60-second ad breaks during an episode of a popular TV show. The TV show has specific cue points that DFP ingested from your content management system (CMS). You can set up ad rules to specify when the ads should appear (either at the pre-defined cue points or after a certain number of minutes), what types of ads appear, and how many ads should appear during each ad break.
For all sports videos on your website, you want to show pre-roll ads followed by a house ad (also called a bumper). You can set up an ad rule to specify what types of ads can show and how long they should run, then target the ad rule to videos with the correct metadata.
Sample standard ad rules
The table below shows sample ad rules along with how you could target those ad rules. The first column shows general, non-targeted ad rules; these ad rules could apply to any video request. The second column shows how each general ad rule can turn into a targeted ad rule by applying targeting criteria. Targeting is part of the ad rule creation process.
|General standard ad rule: applies to all video requests||Targeted standard ad rule: associated with certain videos, based on the video metadata from the CMS|
|Show pre-roll ads||Show pre-roll ads for comedy content
(use key-value genre is comedy)
|Show a 15-second pre-roll, a 30-second mid-roll at every cue point, and a 15-second post-roll||Show a 15-second pre-roll, a 30-second mid-roll at every cue point, and a 15-second post-roll for videos more than ten minutes
(targets duration > 10 minutes)
|Show a 30-second pod of mid-roll ads||Show a 30-second pod of mid-roll ads for specific videos
(targets specific videos)
Session ad rules
Session ad rules define when pre-roll ads show on a section of your site. Unlike standard ad rules, session ad rules are frequency-based and apply across multiple video streams. They control how long a visitor can watch content across streams before an ad shows, and how many ads that visitor sees. Like standard ad rules, session ad rules control the type of ad formats that appear and what the source of the ads should be.
Session ad rules require the availability of a user identifier, such as a cookie, PPID, IDFA, AdID, etc. If an identifier is not present, the line item may still serve whenever it's eligible.
Session ad rules can only be applied to pre-roll ads. For DBM ads served via Ad Exchange backfill, session ad rules are not supported when passing a PPID.
A music site wants to apply different policies to different content groups, depending on site location. For new content, they show a pre-roll every 5 videos; for archived content, they show a pre-roll every 7 videos. These session ad rules work independently of any standard ad rules applied to specific video streams.
A travel-booking site wants to show ads starting with the first video in a session and then every 3 videos after that, no matter where on the site the videos are shown.
A sports site wants to show ads every 3 videos, but also wants to ensure that a video with a sponsorship booked against it always shows an ad. The publisher books a session ad rule for the site, but sets a higher priority for the standard ad rule for the video with the sponsorship ad.
Enable video ad rules
You can begin using video ad rules by enabling them in your entire DFP network, or in individual ad tags only.
Enable video ad rules for your entire network
Not available in DFP Small Business.
- Sign in to DoubleClick for Publishers.
- Click Admin Video.
- Select Enable ad rules.
- Click Save.
If you are not certain that all your players are integrated with the IMA SDK 3 and able to process playlist responses from ad rules-enabled requests, enabling this flag will disrupt your video ad serving.
You can either enable this flag only when all of your players are compatible, or prevent ad rules from applying to a specific ad tag by adding the parameter
Enable video ad rules for an individual tag
To only enable ad rules for an individual ad tag, simply add the parameter