The primary directive for specifying an ad slot using the library.
This directive is repsponsible for collecting all nested configuration options
and ultimately making the ad call. All other tags in the library, except
dfp-video
and dfp-audience-pixel
can and must be nested under this tag.
- License:
-
- Apache Copyright 2016 Google Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Example
Example usage of the `dfp-ad` directive.
<dfp-ad force-safe-frame collapse-if-empty refresh='3s' ad-unit="/path/to/my/ad-unit"> <dfp-size width="728" height="90"></dfp-size> <dfp-targeting key="sport" value="football"></dfp-targeting> <dfp-targeting key="food"> <dfp-value>chicken</dfp-value> <dfp-value>meatballs</dfp-value> </dfp-targeting> <dfp-responsive viewport-width="320" viewport-height="0"> <dfp-size width=320 height=50></dfp-size> </dfp-responsive> </dfp-ad>