Clear search
Close search
Google apps
Main menu

About key-value targeting

Key-values (4:43)

Use key-value targeting with care. Under the terms of your contract, you must not pass any information to DoubleClick that DoubleClick could use or recognize as personally identifiable information.

With key-value targeting, you can define your own targeting criteria (such as age, gender, or content) that DFP wouldn't otherwise be able to determine. For example, you can define custom criteria based on common characteristics of your site visitors that you collect through your website. DFP can't determine these criteria, but if, for example, you have user registration data from your site, you can specify demographic information such as gender, age and user interests.

Here's how to use key-value targeting: Create key-values in DFP, target your line items to them, and then pass the key-values into your ad tags. If a line item targets a key-value, the ad server will only serve it to the ad tags on your website that include that key-value. Learn about system limits for keys and values

You don’t need to create a key-value to represent the size of your ad tag since you define ad tag size when you create ad units.

If your DFP network is linked to Ad Exchange, then the key-values you create in DFP are also available for targeting in your linked Ad Exchange account.

Predefined versus free-form key-values

You can either pre-define a key and its values or you can set up a free-form key-value. With free-form key-values, you define the key but the values are dynamically passed to the ad tag based on information about a user or a user's behavior. If you require more than 200 possible targeting values per key and don't want to define your targeting values in advance, use free-form targeting instead of key-value targeting.

Predefined key-values

Use predefined key-values when you know the possible values of a targeting key in advance based on common characteristics of your site visitors that you collect through your website. Let's say that you want to target a line item to people between the ages of 18-34 years-old. You can create a predefined key called age and enter several age ranges as the possible values. When you create the line item, select age as a key and then select 18-34 as the value. That key-value will remain hard-coded in the ad tag.

When you target a line item to a predefined key-value, you will see a list of values that are defined in the Inventory tab. You can only choose from that list of values. Once a value is removed from the Inventory tab, you don't see it as an option when you're targeting that key.

Free-form key-values

Use free-form key-values when you want to pass targeting values dynamically into an ad tag based on information you collect from your users. For example, you can use free-form key-values to target ads based on the search terms a user enters into your site's search engine. There's no way of knowing in advance what users will search for, so you can create a free-form key and use "begins with" and include match wildcards in the targeting value to allow for variances in users' searches. To do this, your webmaster should add JavaScript code to your site that translates search terms entered by your site's visitors into key-values and passes those key-values into the ad tags.

You can also use free-form key-values when there are too many possible values to define in advance. For example, you can create a key called occupation. There are too many occupations to define in advance as targeting values, so you can make this key free-form and enter specific occupations at the time you create the line item. With free-form targeting, you can have thousands of possible targeting values, because there's no need to define each value ahead of time. When you need to target a specific value, you can simply enter that targeting value into your line item.

When you target a line item to a free-form key-value, you will see an open text box and beneath that, you may see a list of suggested values. That list of suggested values is based on values you've targeted in the past. You can choose from that list or type a new value in the box.

Let's say you have a car website where users search for information about different brands of cars. You want to target a line item to appear any time a user searches for the term honda. First, create a free-form key. It doesn’t matter what key you create as long as it means something to you; for example, you might create car= or brand= or search=. Let’s say you create search=. Next, make sure your webmaster has set it up so that when a user searches for a term, the key-value search=search_term will be passed to your ad tags. Once that's in place, you can target ads in DoubleClick for Publishers to the search term honda by targeting search=honda in the key-value section of the line item screen. Then, whenever a user searches for the word honda, your line item will appear.

That would be an effective targeting solution for your Honda ads, but you'd probably see very few impressions for this ad. That's because DoubleClick for Publishers uses exact match by default when targeting key-values. This means that unless the key-value in your ad tag matches the key-value targeted by the line item exactly, the line item won't deliver to that ad tag. In the example above, if the line item is targeting search=honda and a user types in honda civic, that line item won’t be delivered to them because the search term they entered (honda civic) and the key-value that was created dynamically from that search term (search=honda civic) don't match up exactly with what the line item targeted in DoubleClick for Publishers (search=honda).

Example use cases

Target line items to demographic groups

You can define custom criteria based on common characteristics of your site visitors that you collect through your website. DoubleClick for Publishers can't determine these criteria, but if, for example, you have user registration data from your site, you can specify demographic information such as gender, age and user interests. You could create a custom key, gender, with the values male and female. Then you could target specific user types like Men in the San Diego metropolitan area who use Mac OS X using a combination of DFP criteria and your custom criterion gender.

Target line items to very specific areas of your site

Another way you might use key-values is to target ads to specific pages on your site. You could create an ID for each page or article and then create key-values like articleID=123. Add that key-value to the ad tags of that page and then target your line item to that key-value to ensure your line item only shows up on that page. Most publishers pass such key-values to their ad tags dynamically through their content management system (CMS).

You can also use key-values to target ads to specific ad slot positions. Maybe you sell your ad slots above the fold at a premium. You can create a key to define the ad slot position as top (for example, position=top) and target certain line items to that key-value so they don't show below the fold.

Was this article helpful?
How can we improve it?