Skip to main content

Importing Key-Values from GAM

Import your GAM key-values for use in targeting and reporting.


What are key-values?

Key-values are custom targeting parameters in Google Ad Manager:

KeyExample valuesUse case
content_typearticle, video, galleryTarget by content
sectionsports, news, entertainmentTarget by section
postop, sidebar, footerTarget by position

How key-values are imported

Connecting GAM (see Connecting GAM) grants Anima access to your network — it doesn't pull key-values automatically. You import them on demand:

  1. Switch to Ad Manager (main) mode
  2. Go to Inventory → GAM → Key Values
  3. Click Import to pull all reportable keys, or use the dropdown for Filter by Name / Exact Name

To refresh a single key after a change in GAM, use its per-row Sync from GAM action. Anima doesn't run a background job that re-pulls key-values on a schedule — they update only when you import or sync.


Viewing imported key-values

  1. Switch to Ad Manager (main) mode
  2. Go to Inventory → GAM → Key Values
  3. Key-values surfaced from your GAM network are listed there
ColumnDescription
KeyThe key name
ValuesAllowed values (if predefined)
TypePredefined or freeform
StatusActive/Inactive

Using key-values

In layout targeting

A layout's Targeting adds GAM key-value conditions to the ad requests for that layout's slots. It does not select which pages the layout applies to — that's set by the layout's page-path and audience (Layout targeting), not by key-values.

  1. Edit a layout
  2. In Targeting, add key-value conditions
  3. Example: adding section = sports sends section=sports on this layout's ad requests

In reporting

Key-values appear as dimensions in reports:

  1. Go to Dashboard → Monetization
  2. Add key-value as a dimension
  3. Segment data by key-value

Key-value types

Predefined values

Fixed list of allowed values:

  • content_type: article, video, gallery
  • Only these values are accepted

Freeform (dynamic)

Any value accepted:

  • author: john-smith, jane-doe, etc.
  • Values created as they're used

Passing key-values from your site

For key-values to work, your site must send them with ad requests:

// Example: Setting key-values on your page
window.googletag = window.googletag || { cmd: [] };
googletag.cmd.push(function() {
googletag.pubads().setTargeting('section', 'sports');
googletag.pubads().setTargeting('content_type', 'article');
});

Your development team will implement this based on your site's technology.


Troubleshooting

Key-values not appearing

CauseSolution
Not imported yetRun Import from Inventory → GAM → Key Values
Key-value not in GAMCreate it in GAM first
Recent GAM changeUse the per-row Sync from GAM, or re-import

Values not matching

If targeting isn't working:

  1. Verify the key name matches exactly (case-sensitive)
  2. Check value spelling
  3. Confirm your site is passing the values correctly

Next steps