Define and target custom criteria

To target custom criteria, you first need to define them on the Inventory tab.

Define custom criteria key-values

To create custom targeting criteria:

  1. Click the Inventory tab, then click Custom targeting on the left-hand panel.
  2. Click New key.
  3. Enter the name that will be used in the ad tag for your targeting key in the Name box.
  4. Enter the name that your traffickers will see when they're targeting key-values in the Display name box.

    You may want a different display name if you're going to encode your key-values. You might use encoded key-values in your ad tag if you don't want visitors to worry about the information that's passed in the tag. For example, if you're targeting females, you would use the encoded key-value g=f in the ad tag. To make it easier for traffickers to find this key-value in DFP, you can assign the display name 'gender=female' to the key-value.

  5. Select whether you will enter targeting values when creating line items or predefine your targeting values.
  6. Click Add values, enter the targeting values, separated by line breaks, and click Apply.

    These values will be used in the ad tag.

    You can enter targeting values for both predefined and free-form keys. You may want to add values for free-form keys to suggest values to your traffickers while still allowing them to enter their own.

  7. To enter names that your traffickers will see when they're selecting targeting values, click the Display name column next to the targeting value. Enter the display name in the box that displays and click Apply.
  8. Click Save.
You can quickly edit display names directly on the 'Custom targeting' page of the 'Inventory' tab. Just click a display name, make your changes, and click Save.
Format key names and values
  • Casing: Neither keys nor values are case-sensitive.
  • Maximum characters allowed: Key names can contain up to 10 characters each, and values can contain up to 40 characters each.
  • Maximum keys and values allowed: DFP Small Business supports up to 20 custom targeting key names. Each key name can contain up to 200 values. For example, you might call the first of your 20 key names age and define four (out of the 200) values as follows: 13-18, 19-34, 35-50, and 50.
  • Multiple values per page: You can pass multiple values per page.
  • Data type of values: Values are not data-specific; all values are treated as strings. For example, instead of using age >= 18 AND <34, try 18-34.
  • Numeric prefix: Key names cannot be prefixed with a number.
  • Key names and key values invalid characters: You can't use the following characters when you create custom targeting key names and key values:

    " (double quotes)
    ' (apostrophe)
    = (equal sign)
    ! (exclamation point)
    + (plus sign)
    # (pound sign)
    * (asterisk)
    ~ (tilde)
    ; (semicolon)
    ^ (caret)
    () (parentheses)
    < > (angle brackets)
    [ ] (square brackets)
    , (comma)
    . (period)
    & (ampersand)
    Spaces: You can't use spaces in the key of a targeting criterion. For example, sports car=porsche is not valid. You can, however, use spaces in the value. For example, car=red porsche is valid.

Target custom criteria

Target custom criteria the same way you target all other criteria, on the Settings tab of a line item.

Use different match types

You can use different match types to more broadly target line items to search terms and other dynamic criteria.

  • Exact match

    If you don't add any special modifiers to a targeted value, the user search must match it exactly. For example, if you target travel, travelers and travels don't match.

  • "Begins with" match

    Use an asterisk (*) at the end of a value to match items that begin with the value but have additional characters at the end. For example, travel* would match values like traveler and traveling, as well as travel the world, because these terms begin with travel. It would not match terms such as where to travel or fasttravel.

  • "Include" match

    Use a tilde (~) at the beginning of a value to include values that have the entire word in them, in any location. For example, ~travel would match values like adventure travel and travel insurance, but not travelers or travelers insurance.

  • "Begins with" and "include" match

    Now we're getting fancy. You can use both a tilde and an asterisk on a value: ~travel*. The "begins with" part of the value can now appear anywhere in the value, not just at the beginning. Our example would match travelers, luxury travelers, travel insurance, traveling penalty, but not re-travel.

  • Values with spaces

    When you're using match types, spaces are treated as characters within the value. For example, travel deal* would match travel deals and travel dealership, but not traveling deal.

The following tables give more examples of different match types. For each value on the left, you can see whether a series of search terms are considered matches. Terms that don't match are crossed out.

Single-word values

Match type Value Does the search term match?
Exact match car car car parts cartoon used car Madagascar
Begins with car* car car parts cartoon used car Madagascar
Include ~car car car parts cartoon used car Madagascar
Begins/include ~car* car car parts cartoon used car Madagascar

The following table gives examples of different match types for multi-word values.

Multi-word values

Match type Value Does the search term match?
Exact match new car new car new car buy new car new car smell new cartoon
Begins with new car* new car new car buy new car new car smell new cartoon
Include ~new car new car new car buy new car new car smell new cartoon
Begins/include ~new car* new car new car buy new car new car smell new cartoon

These match types can also be applied to key-values that aren't search terms.

In addition to using these match types for search terms and key-values that are dynamically passed to the ad tag (like demographic information about a user), you can use them in key-values that are hard-coded in the ad tag (like information about the content of the page).

For example, let's say you have a car website and you've made key-values for the make and model of cars that you feature on the site. You may have a key-value for car=hondacivic that is hard-coded in the ad tags on the pages of your site that discuss the Honda Civic. You may also have key-values for car=hondaaccord and car=hondainsight. If you want to target all the pages of your site that discuss Hondas, you could target a line item to car=honda* and that line item would show to any key-value that has a value that begins with the word honda.

The above example is of a "begins with" match, but you can also use other match types to target key-values that aren't search terms.

Advanced expressions

For advanced users who want to create complex custom targeting expressions, you can click advanced expression and enter or paste a regular expression containing your custom targeting. The key names must match key names that have been created in DFP, and the values must be either defined values or free-form values that have already been passed to the ad server at least once. When you're done, click Process expression.

To create an expression, you can use the following operators:

= (equals)
!= (is not)
( ) (parentheses to group items)
, (or)
and (and)
" " (use quotation marks around spaces)

Example expressions:

Note that you can use De Morgan's Laws to create various equivalents of advanced expressions. For example:

  • (age=13-20, age=40-50) AND (income=10k, income=20k) AND status!=member AND hobby="rock climbing"
  • NOT (playing AND eating) is equivalent to (NOT playing) OR (NOT eating).
  • NOT (soccer OR basketball) is equivalent to (NOT soccer) AND (NOT basketball).

Deactivate custom criteria

To delete custom criteria, enable the checkbox next to the key name and click Delete. However, it may make more sense to think of this action as deactivating the key, rather than deleting it.

Learn about deactivating custom criteria

 

Training: Check out the DFP Inventory Fundamentals training module.
Was this article helpful?
Yes
No