About key-values

Predefined and dynamic key-values

When you add key-values, you'll need to understand the difference between predefined and dynamic key-values.

  • Predefined key-values: keys and their values are static and don't change based information of a particular user.
  • Dynamic key-values: use a defined key but take dynamic values based on user attributes or behavior. Use dynamic targeting if you don't want to define key values in advance.

Predefined key-values

Use predefined key-values when you know the possible range of values.

For example, create the predefined key "age", and enter ranges as values—such as, "18-32", "33-42", and so forth. When you add the line item, select "age" as the key and "18-32" as the value. The key-value remains hard-coded in the ad tag.

Most publishers believe it's good practice to use less identifiable key-values strings in ad tags. Learn more in Names versus display names.

Dynamic key-values

Only targeting keys marked as "reportable" are included in Ad Manager reports. When you make a key reportable:

  • All values defined for that key are also included in reports from that time forward.
  • Reports covering dates before a key is added to reporting won't display data for the key.
  • Undefined values won't appear in reporting, even if their key is reportable. The values must be defined first.

Example of dynamic key-values

Target line items to specific content and ad slots. If you want to target specific pages on your site, create a dynamic key named "pageID". Add pageID=123456 to the page's ad tags and then target your line item to that key-value.

You might also use key-values to target ads to specific ad slot positions. If you sell your ad slots above the fold at a premium, create a pre-defined key called "position" with multiple values, such as "top", "right-box", and "bottom". Add the key and value combination to your ad tags (position=top) and target certain line items to that key-value so they don't appear below the fold.

Was this helpful?
How can we improve it?

Need more help?

Sign in for additional support options to quickly solve your issue

Clear search
Close search
Google apps
Main menu
Search Help Center