How to Use Key-Value Targeting in Google Ad Manager: A Step-by-Step Guide

Mediawrkz Experts

Published April 17, 2025

If you’ve ever wished for more control over where and how your ads show up, key-value targeting in Google Ad Manager (GAM) might be a game-changer for your ad ops strategy.

Whether you’re trying to differentiate homepage traffic from article views, serve different ads on mobile versus desktop, or offer advertisers more granular audience segments, key-value targeting makes it all possible.

It lets you pass custom information with every ad request. GAM then uses this data to match that request with the right line item, giving you better targeting, improved ad performance, and smarter inventory management.

How Key-Value Targeting Helps

Key-value targeting can be leveraged in various ways to enhance ad targeting and inventory management:

  • Segregating Inventory: Publishers can classify their ad inventory based on categories such as device type, content type, or audience segments, making it easier to manage ad placements.
  • Identifying Specific Pages: Publishers can tag individual pages (e.g., “homepage,” “sports_section”) and serve ads based on the content users are engaging with.
  • Targeting Specific Parts of a Page: If a webpage has multiple ad placements, key-value targeting can ensure that ads are placed in relevant sections, improving engagement and performance.

Setting Up Key-Value Pairs in 3 Steps

Step 1 – Creating a Key-Value Pair

  • In your GAM account, go to Inventory > Key-values, then click New Key-value
  • Add a name (e.g., page_category) and a display name. Remember, once you save the name, you can’t change it

You’ll need to choose one of two value types:

  • Predefined: Values you set ahead of time in GAM (like sports, tech, etc.) — great for consistency across campaigns.
  • Dynamic: These are passed in real time via ad tags. Ideal for flexible or real-time scenarios.

If you have chosen the predefined field – Click on “New values” and enter the values. For example, the possible values that the key can take (e.g., “sports,” “technology”). Please note that as soon as you click on “New values” the Key-value is saved.

We recommend including the key-values in GAM reporting by checking on “include values in reporting”

Step 2 – Adding Key-Value Pairs to GPT Tags

Once your key-values are ready, it’s time to pass them to GAM. You’ll do this by inserting them into your Google Publisher Tag (GPT) script on your website or app.

That way, when someone visits your site, the right targeting info gets sent along with the ad request.

Step 3 – Applying Key-Value Targeting at the Line Item Level

Now that everything’s set up, it’s time to put your key-values to work.

  • Open the relevant Line Item in GAM
  • Go to the Custom Targeting section
  • Select your key (e.g., page_category) and assign the values you want to target (e.g., sports, tech)

You can also combine multiple key-values using AND or OR logic for more precise targeting.

Making the Most of Key-Value Targeting

Key-value targeting is one of the most powerful tools in your GAM toolkit. It helps you:

  • Serve more relevant ads
  • Manage your inventory more efficiently
  • Increase your overall revenue potential

By strategically setting up key-value pairs, integrating them into your ad tags, and applying them to line items, you can create a hyper-targeted ad experience that benefits both advertisers and users.

Plus, advertisers love this level of segmentation. It gives them more control, which often translates to higher demand for your premium inventory.

Key-value targeting in Google Ad Manager gives you the flexibility to serve smarter, more personalized ads — all while maintaining better control over your inventory.

Related Blogs