Key-values
URL macros in image and click URLs
If you are using the GAM Email AdServer product, you can use one of the existing supported key-values for targeting purposes, or add your own.
Key-value configuration in GAM
Please make sure to configure the key-values you want to use in the “Key-values” section under the Inventory tab in GAM in order use them for targeting or reporting in your line items.
Default key-values
The following key-values are automatically passed through to GAM. The values are passed in lowercase.
🌐 Geo-targeting
Key-value | Description |
---|---|
| The country code in ISO 3166-1 alpha-2 form. This can be used to target a line item to one or more countries. For example, you can target to a line item only if the traffic is from |
| The region code in ISO 3166-2 form. Each ISO 3166-2 code consists of two parts, separated by a hyphen:
|
| The name of the city. For example, if you want to target a line item to only traffic from Paris, you would target to the key You can find the list of city names via https://www.geonames.org/ |
| The postal code |
| The Nielsen DMA code. For example, if you want to target a line item based to traffic from the Boston / Manchester region, you would target the key |
🎯 Proxy targeting
Key-value | Description |
---|---|
| Set to Gmail uses an image proxy and this will be set to true when the ad impression is from Gmail, as well as for Yahoo, Outlook and Apple Proxy. |
| The name of the proxy when The value will be one of:
|
Limitations for proxy traffic
For Proxy traffic, the following fields will not be set as the data is of unknown accuracy:
pi_geo_regioncode
pi_geo_city
pi_geo_postalcode
pi_geo_metrocode
Custom key-values
You can pass custom key value pairs to GAM by adding query params to your image and click urls using the dfp_
prefix.
For example if you wanted to pass the day of the week as a key value to GAM, you would:
- Add the following query parameter to your image and click urls
dfp_dayofweek=<value>
(for examplesunday
). - Target your line items in GAM to the key
dayofweek
with valuesunday
.
Key-value configuration in GAM
The
dfp_
prefix is stripped off when passing the key-value. On the GAM side, you must use the name of the key without that prefix i.e if the query parameter isdfp_<key>
, the key-value to configure in GAM will be<key>
without the prefix.
Reporting
In order for the key-values to appear in reports, they must be marked as reportable.
Under Inventory / Key-values, edit the key-values you want to make reportable and select "Dynamic" and "Include values in reporting".

When running reports, you can add the Key-values dimension under Inventory

You can also optionally filter to a specific key-value

Custom reporting dimensions
If you want to use a specific key value as a custom dimension in reports, it needs to be pre-defined. Note that there is a limit of 200 values per key and this also counts against the total values limit in your account. Below are preset values for some of our key-values to help you set up your account.
Data set | Information |
---|---|
This data set is too large to use for the | |
This data set is an optimized country list with the maximum of 200 entries, with a subset of countries excluded based on population, GDP and geographical area. Depending on your audience, you may want to adjust the selection, using the full list as a starting point. | |
The list of 4 recognized proxy types |

Example of pre-defined values for proxy types
Updated 4 days ago