A directive for specifying DFP key/value targeting.
DFP has a concept of "key/values" to allow targeting of ads against slots that have certain values for certain keys. This directive enables adding one or more such key/value pairs for an ad slot.
The dfp-targeting
directive must nested in a dfp-ad
tag. It may then be
used either by directly passing a key
and a value
via attributes, or
alternatively by specifying only a key
attribute and adding values via
nested dfp-value
tags.
- 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
<dfp-ad ad-unit="path/to/my/ad-unit"> <dfp-targeting key="sport" value="quidditch"></dfp-targeting> <dfp-targeting key="food"> <dfp-value>chicken</dfp-value> <dfp-value>meatballs</dfp-value> </dfp-targeting> </dfp-ad>