REST Resource: networks.customTargetingKeys
Stay organized with collections
Save and categorize content based on your preferences.
Resource: CustomTargetingKey
The CustomTargetingKey
resource.
Fields |
name |
string
Identifier. The resource name of the CustomTargetingKey . Format: networks/{networkCode}/customTargetingKeys/{customTargetingKeyId}
|
customTargetingKeyId |
string (int64 format)
Output only. CustomTargetingKey ID.
|
adTagName |
string
Immutable. Name of the key. Keys can contain up to 10 characters each. You can use alphanumeric characters and symbols other than the following: ", ', =, !, +, #, *, ~, ;, ^, (, ), <, >, [, ], the white space character.
|
displayName |
string
Optional. Descriptive name for the CustomTargetingKey .
|
type |
enum (CustomTargetingKeyType )
Required. Indicates whether users will select from predefined values or create new targeting values, while specifying targeting criteria for a line item.
|
status |
enum (CustomTargetingKeyStatus )
Output only. Status of the CustomTargetingKey .
|
reportableType |
enum (CustomTargetingKeyReportableType )
Required. Reportable state of the CustomTargetingKey .
|
CustomTargetingKeyType
Type of the custom targeting key.
Enums |
CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED |
Not specified value. |
PREDEFINED |
Key with a fixed set of values. |
FREEFORM |
Key without a fixed set of values |
CustomTargetingKeyStatus
Status of the custom targeting key.
Enums |
CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED |
Not specified value. |
ACTIVE |
Custom targeting key is active. |
INACTIVE |
Custom targeting key is inactive. |
CustomTargetingKeyReportableType
Reportable type of the custom targeting key.
Enums |
CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED |
Not specified value. |
OFF |
Not available for reporting in the Ad Manager query tool. |
ON |
Available for reporting in the Ad Manager query tool. |
CUSTOM_DIMENSION |
Custom dimension available for reporting in the AdManager query tool. |
Methods |
|
API to retrieve a CustomTargetingKey object. |
|
API to retrieve a list of CustomTargetingKey objects. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[null,null,["Last updated 2025-08-20 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eCustomTargetingKey\u003c/code\u003e resource allows publishers to define custom targeting criteria for their ad inventory using keys and values.\u003c/p\u003e\n"],["\u003cp\u003eCustom targeting keys can be either predefined, with a fixed set of values, or freeform, allowing users to create new values.\u003c/p\u003e\n"],["\u003cp\u003eThe status of a custom targeting key can be either active or inactive, indicating its current availability for targeting.\u003c/p\u003e\n"],["\u003cp\u003eCustom targeting keys can be configured to be reportable, making them available for analysis in the Ad Manager query tool.\u003c/p\u003e\n"],["\u003cp\u003ePublishers can manage custom targeting keys programmatically using methods to retrieve and list these objects.\u003c/p\u003e\n"]]],["CustomTargetingKeys manage ad targeting criteria using identifiers like `name`, `customTargetingKeyId`, and `adTagName`. These keys have attributes, including `displayName`, `type` (PREDEFINED or FREEFORM), `status` (ACTIVE or INACTIVE), and `reportableType` (OFF, ON, or CUSTOM_DIMENSION). The API allows retrieving a single CustomTargetingKey object or a list of them. A key can contain up to 10 characters, using alphanumeric characters and some symbols.\n"],null,["# REST Resource: networks.customTargetingKeys\n\n- [Resource: CustomTargetingKey](#CustomTargetingKey)\n - [JSON representation](#CustomTargetingKey.SCHEMA_REPRESENTATION)\n- [CustomTargetingKeyType](#CustomTargetingKeyType)\n- [CustomTargetingKeyStatus](#CustomTargetingKeyStatus)\n- [CustomTargetingKeyReportableType](#CustomTargetingKeyReportableType)\n- [Methods](#METHODS_SUMMARY)\n\nResource: CustomTargetingKey\n----------------------------\n\nThe `CustomTargetingKey` resource.\n\n| JSON representation |\n|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ``` { \"name\": string, \"customTargetingKeyId\": string, \"adTagName\": string, \"displayName\": string, \"type\": enum (/ad-manager/api/beta/reference/rest/v1/networks.customTargetingKeys#CustomTargetingKeyType), \"status\": enum (/ad-manager/api/beta/reference/rest/v1/networks.customTargetingKeys#CustomTargetingKeyStatus), \"reportableType\": enum (/ad-manager/api/beta/reference/rest/v1/networks.customTargetingKeys#CustomTargetingKeyReportableType) } ``` |\n\n| Fields ||\n|------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `name` | `string` Identifier. The resource name of the `CustomTargetingKey`. Format: `networks/{networkCode}/customTargetingKeys/{customTargetingKeyId}` |\n| `customTargetingKeyId` | `string (`[int64](https://developers.google.com/discovery/v1/type-format)` format)` Output only. `CustomTargetingKey` ID. |\n| `adTagName` | `string` Immutable. Name of the key. Keys can contain up to 10 characters each. You can use alphanumeric characters and symbols other than the following: \", ', =, !, +, #, \\*, \\~, ;, \\^, (, ), \\\u003c, \\\u003e, \\[, \\], the white space character. |\n| `displayName` | `string` Optional. Descriptive name for the `CustomTargetingKey`. |\n| `type` | `enum (`[CustomTargetingKeyType](/ad-manager/api/beta/reference/rest/v1/networks.customTargetingKeys#CustomTargetingKeyType)`)` Required. Indicates whether users will select from predefined values or create new targeting values, while specifying targeting criteria for a line item. |\n| `status` | `enum (`[CustomTargetingKeyStatus](/ad-manager/api/beta/reference/rest/v1/networks.customTargetingKeys#CustomTargetingKeyStatus)`)` Output only. Status of the `CustomTargetingKey`. |\n| `reportableType` | `enum (`[CustomTargetingKeyReportableType](/ad-manager/api/beta/reference/rest/v1/networks.customTargetingKeys#CustomTargetingKeyReportableType)`)` Required. Reportable state of the `CustomTargetingKey`. |\n\nCustomTargetingKeyType\n----------------------\n\nType of the custom targeting key.\n\n| Enums ||\n|-----------------------------------------|-----------------------------------|\n| `CUSTOM_TARGETING_KEY_TYPE_UNSPECIFIED` | Not specified value. |\n| `PREDEFINED` | Key with a fixed set of values. |\n| `FREEFORM` | Key without a fixed set of values |\n\nCustomTargetingKeyStatus\n------------------------\n\nStatus of the custom targeting key.\n\n| Enums ||\n|-------------------------------------------|-----------------------------------|\n| `CUSTOM_TARGETING_KEY_STATUS_UNSPECIFIED` | Not specified value. |\n| `ACTIVE` | Custom targeting key is active. |\n| `INACTIVE` | Custom targeting key is inactive. |\n\nCustomTargetingKeyReportableType\n--------------------------------\n\nReportable type of the custom targeting key.\n\n| Enums ||\n|----------------------------------------------------|-----------------------------------------------------------------------|\n| `CUSTOM_TARGETING_KEY_REPORTABLE_TYPE_UNSPECIFIED` | Not specified value. |\n| `OFF` | Not available for reporting in the Ad Manager query tool. |\n| `ON` | Available for reporting in the Ad Manager query tool. |\n| `CUSTOM_DIMENSION` | Custom dimension available for reporting in the AdManager query tool. |\n\n| Methods ------- ||\n|--------------------------------------------------------------------------------------|---------------------------------------------------------|\n| ### [get](/ad-manager/api/beta/reference/rest/v1/networks.customTargetingKeys/get) | API to retrieve a `CustomTargetingKey` object. |\n| ### [list](/ad-manager/api/beta/reference/rest/v1/networks.customTargetingKeys/list) | API to retrieve a list of `CustomTargetingKey` objects. |"]]