---
title: GAM setup with Ad Management
description: GAM setup with key values for Prebid
---

[Skip to content](https://help.pubstack.io/migration/gam-setup-for-prebid#main-content)

English

Show submenu for translations

[Contact us](https://help.pubstack.io/migration/kb-tickets/new?hsLang=en) [Customer portal](https://help.pubstack.io/tickets-view?hsLang=en)

![Logo Pubstack white.svg\]](https://help.pubstack.io/hubfs/Logo%20Pubstack%20white.svg)

Open main navigation

Close main navigation

- English
  
  Show submenu for translations
- [Contact us](https://help.pubstack.io/migration/kb-tickets/new)
- [Customer portal](https://help.pubstack.io/tickets-view)
- Go to Pubstack

 Go to Pubstack

 Welcome on our knowledge base

- There are no suggestions because the search field is empty.

1. [Knowledge Base](https://help.pubstack.io/migration?hsLang=en)
2. [Ad Management (One)](https://help.pubstack.io/migration/ad-management-one?hsLang=en)
3. [Implementation](https://help.pubstack.io/migration/ad-management-one?hsLang=en#implementation)

# GAM setup with Ad Management

## GAM setup with key values

#### Key-values

Pubstack adds prefixes to most key values to make them easier to understand. The following prefixes are commonly used:

- The `ad_` prefix to describe ad unit properties
- The `bid_`prefix to describe header bidding opportunities
- The `xp_` prefix to describe all A/B test properties

Pubstack creates the key values listed below. Since Google has limitations on the number of custom dimensions and values, Pubstack creates key values as "reportable". To use a specific key values as a custom dimension, the publisher must manually convert it with the assistance of a Pubstack account manager.

| Key-Values | Usage | Value examples | Value type | Type of KV |
| --- | --- | --- | --- | --- |
| adm | True if the ad request is managed by Pubstack, use for the reporting and billing | ‘1’ | dynamic | reportable |
| adm\_ab\_test | Used for Poc A/B tests only - test populations of Poc-Override A/B tests | 'poc:A, poc:B' | predefined | custom dim |
| adm\_stack | Used for stack reporting and stack A/B test reporting | 'stackID\_stackversion' | dynamic | reportable |
| ad\_index | The rank of the ad unit when the ad unit is present several on a page - used with dynamic ad units | '1,2,3 … 50' | predefined | reportable |
| ad\_refresh-rank | 1 means the second auction for the slot and so on, the key is not present on the 1st auction | '1,2,3 … 10' | predefined | reportable |
| ad\_floor-rule | Key uses for enabling a specific UPR, the value is computed dynamically by Pubstack | ‘0.05’, 0.10...6.00’ | predefined | reportable |
| ad\_fluidstyle | Values are "rectangle" \| "banner". Used to determine which fluidstyle must serve. | 'banner', 'rectangle' | predefined | reportable |
| ad\_safeframe | (beta) True means the Prebid bid will be served a safeframe, the key not present otherwise | ‘1’ | predefined | off |
| ad\_adunitname | (optional) Name of the ad unit name when we need to use it |  | dynamic | reportable |
| bid\_nobid | true if no Prebid bid, use for debugging purpose, not present otherwise | ‘1’ | predefined | reportable |
| bid\_mediatype | Mediatype of the Prebid bid (alias of hb\_format) | ‘banner’, ‘outstream’, ‘native’ | predefined | reportable |
| bid\_cpm | Prebid winning bid CPM, (alias of hb\_pb) | ‘0.20’, ‘0.15’, ‘3.10’, … | predefined | reportable |
| bid\_bidder | Prebid bidder name (alias of hb\_bidder) | ‘appnexus’, ‘improve’ | dynamic | reportable |
| bid\_id | Prebid creative and bid Id (alias of hb\_adid) | ‘ad35e76’, ‘7e5413i’, … | dynamic | off |
| bid\_size | Prebid creative size (alias of hb\_size) | '300x250, 300x600...' | predefined | reportable |
| no\_cmp | Only used if traffic outside EU - true if gdprApplies = false. Can be used for reporting purposes. | 'true' | predefined | reportable |
| pbstck\_ab\_test | Used for analytics A/B tests only - test populations of Analytics A/B tests |  | predefined | reportable |
| pbstck\_refresh | True if the ad request is not the 1st request, the key not present otherwise | '1' | predefined | custom dim |
| xp\_variant | (beta) Name of the variant for a specific ab test (source from the related `meta`) | 'floor\_optimization:true...' | dynamic | custom dim |

 

We choose to add a targeting: “ad\_index” with a value of all the numbers found in the suffix of the divId. For example for a dyninfeed-1 we send 1 for dyninfeed\_13 we send 13.

If no value is set for instance "dyninfeed", ad\_index=""

Ex : `css:[id^="nfb_2"], [id^="dfp_nfb_2"]` as "dynamic adunit"  
If div id = dfp\_nfb\_3 it will not be targeted. However, it will target adunits starting with `nfb_2` & `dfp_nfb_2`  . Will also work for `dfp_nfb_23`

 

#### Orders, Line Items, and creatives

Pubstack creates two orders to run the Prebid stack with 450 line items. The Prebid Bid Granularity is managed by Pubstack, so publishers don't need to worry about it. We double it for instream line-items.

Pubstack does not split the orders by Prebid Bidders, but publishers still have the ability to report revenue by Prebid bidder using the key values "bid\_bidder"

![Untitled (16)](https://help.pubstack.io/hs-fs/hubfs/Untitled%20(16).png?width=688&height=209&name=Untitled%20(16).png)

The orders and their line items are used interchangeably for the banner, out-stream, and native media types. The line items are used to implement the granularity chosen by Pubstack.

Pubstack uses only two sizes (3x1 and out-of-page) to allow the line items to compete in the dynamic allocation and unified auction of Google Ad Manager.

- The size "3x1" is a generic size allowing the line items to compete whatever is the real size of the Prebid bid. Using this specific size allows more robustness and agility for customizing the sizes of your ad units and stacks. Go to further, please refer to Why Pubstack Uses 3x1 Size for Prebid?
- The size “out-of-page” is a special of GAM, used mostly for the interstitial format. To enable Prebid on the out-of-page slots, the line items required this second size in their definition.

By default, the line items target the inventory “Run-of-network”, meaning that they are enabled on the whole publisher’s inventory and the corresponding Prebid price bucket.

![Untitled (17)](https://help.pubstack.io/hs-fs/hubfs/Untitled%20(17).png?width=688&height=142&name=Untitled%20(17).png)

Finally, and as it’s recommended by Prebid, Pubstack creates a set of 12 creatives to finish the Prebid setup in GAM.

![Untitled (18)](https://help.pubstack.io/hs-fs/hubfs/Untitled%20(18).png?width=688&height=230&name=Untitled%20(18).png)

 

- [What is Pubstack](https://help.pubstack.io/migration/what-is-pubstack?hsLang=en#main-content)

    - [Solutions description](https://help.pubstack.io/migration/what-is-pubstack?hsLang=en#solutions-description)
    - [Demo and trial](https://help.pubstack.io/migration/what-is-pubstack?hsLang=en#demo-and-trial)
- [Analytics](https://help.pubstack.io/migration/analytics?hsLang=en#main-content)

    - [The Pubstack interface](https://help.pubstack.io/migration/analytics?hsLang=en#the-pubstack-interface)
    - [Technical documentation](https://help.pubstack.io/migration/analytics?hsLang=en#technical-documentation)
    - [Use cases](https://help.pubstack.io/migration/analytics?hsLang=en#use-cases)
    - [Ad servers](https://help.pubstack.io/migration/analytics?hsLang=en#ad-servers)
    - [API](https://help.pubstack.io/migration/analytics?hsLang=en#api)
- [Ad Management (One)](https://help.pubstack.io/migration/ad-management-one?hsLang=en#main-content)

    - [Implementation](https://help.pubstack.io/migration/ad-management-one?hsLang=en#implementation)
    - [Technical Documentation](https://help.pubstack.io/migration/ad-management-one?hsLang=en#technical-documentation)
    - [Pubstack UI Ad Management](https://help.pubstack.io/migration/ad-management-one?hsLang=en#pubstack-ui-ad-management)
    - [Use Cases](https://help.pubstack.io/migration/ad-management-one?hsLang=en#use-cases)
    - [Features](https://help.pubstack.io/migration/ad-management-one?hsLang=en#features)
- [Knowledge](https://help.pubstack.io/migration/knowledge?hsLang=en#main-content)

    - [Infographics](https://help.pubstack.io/migration/knowledge?hsLang=en#infographics)
- [Technical Documentation](https://help.pubstack.io/migration/technical-documentation?hsLang=en)
- [The Pubstack Academy](https://help.pubstack.io/migration/the-pubstack-academy?hsLang=en#main-content)

    - [User-Guides](https://help.pubstack.io/migration/the-pubstack-academy?hsLang=en#user-guides)
    - [Webinar Episodes](https://help.pubstack.io/migration/the-pubstack-academy?hsLang=en#webinar-episodes)
- [How to contact Support ?](https://help.pubstack.io/migration/how-to-contact-support?hsLang=en)
- [Pubstack Node](https://help.pubstack.io/migration/pubstack-node?hsLang=en#main-content)

    - [Introduction](https://help.pubstack.io/migration/pubstack-node?hsLang=en#introduction)
    - [Getting Started](https://help.pubstack.io/migration/pubstack-node?hsLang=en#getting-started)
    - [Analytics](https://help.pubstack.io/migration/pubstack-node?hsLang=en#analytics)
    - [Rules](https://help.pubstack.io/migration/pubstack-node?hsLang=en#rules)
    - [Monetisation Management](https://help.pubstack.io/migration/pubstack-node?hsLang=en#monetisation-management)

[![Chill listening crop-3](https://help.pubstack.io/hs-fs/hubfs/pubstack_logo.png?width=89&height=24&name=pubstack_logo.png "Chill listening crop-3")](http://www.pubstack.io?hsLang=en)

We help publishers thrive in a complex programmatic world

Copyright © 2026, Pubstack