CustomTargetingKey represents a key used for custom targeting.
Namespace
https://www.google.com/apis/ads/publisher/v202411
Field
id
xsd:long
The ID of the CustomTargetingKey. This value is readonly and is populated by Google.
name
xsd:string
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-06 UTC."],[[["\u003cp\u003e\u003ccode\u003eCustomTargetingKey\u003c/code\u003e objects represent keys used for custom targeting, allowing for the creation of specific criteria to target ads.\u003c/p\u003e\n"],["\u003cp\u003eThese keys have properties like \u003ccode\u003ename\u003c/code\u003e, \u003ccode\u003edisplayName\u003c/code\u003e, and \u003ccode\u003etype\u003c/code\u003e which determine their functionality and how they are used in targeting.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCustomTargetingKey\u003c/code\u003e can be either \u003ccode\u003ePREDEFINED\u003c/code\u003e, where targeting values are set in advance, or \u003ccode\u003eFREEFORM\u003c/code\u003e, where values are added when creating line items.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003estatus\u003c/code\u003e property, which can be \u003ccode\u003eACTIVE\u003c/code\u003e or \u003ccode\u003eINACTIVE\u003c/code\u003e, indicates whether the key is currently in use for targeting.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ereportableType\u003c/code\u003e determines whether a \u003ccode\u003eCustomTargetingKey\u003c/code\u003e is available for reporting in the Ad Manager query tool, with options including \u003ccode\u003eON\u003c/code\u003e, \u003ccode\u003eOFF\u003c/code\u003e, and \u003ccode\u003eCUSTOM_DIMENSION\u003c/code\u003e.\u003c/p\u003e\n"]]],["The `CustomTargetingService` manages `CustomTargetingKey` objects, which are used for ad targeting. Key actions include creating and updating these keys via `createCustomTargetingKeys()` and `updateCustomTargetingKeys()`. Each key has properties like `id`, `name`, `displayName`, `type` (PREDEFINED/FREEFORM), `status` (ACTIVE/INACTIVE/UNKNOWN), and `reportableType` (UNKNOWN/ON/OFF/CUSTOM_DIMENSION). `performCustomTargetingKeyAction` can activate or deactivate a key. Keys can be predefined or allow freeform value creation.\n"],null,["**Service** \n**CustomTargetingService** **Dependencies** \n[CustomTargetingKeyPage](/ad-manager/api/reference/v202411/CustomTargetingService.CustomTargetingKeyPage) [createCustomTargetingKeys()](/ad-manager/api/reference/v202411/CustomTargetingService#createCustomTargetingKeys) [updateCustomTargetingKeys()](/ad-manager/api/reference/v202411/CustomTargetingService#updateCustomTargetingKeys) \n▼\n**CustomTargetingKey**\n\n\n`CustomTargetingKey` represents a key used for custom targeting.\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202411`\n\n| Field ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `id` | ` `xsd:`long` The ID of the `CustomTargetingKey`. This value is readonly and is populated by Google. |\n| `name` | ` `xsd:`string` 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` | ` `xsd:`string` Descriptive name for the key. |\n| `type` | ` `[CustomTargetingKey.Type](/ad-manager/api/reference/v202411/CustomTargetingService.CustomTargetingKey.Type)` ` Indicates whether users will select from predefined values or create new targeting values, while specifying targeting criteria for a line item. *** ** * ** *** **Enumerations** `PREDEFINED` : Target audiences by criteria values that are defined in advance. `FREEFORM` : Target audiences by adding criteria values when creating line items. \u003cbr /\u003e |\n| `status` | ` `[CustomTargetingKey.Status](/ad-manager/api/reference/v202411/CustomTargetingService.CustomTargetingKey.Status)` ` Status of the `CustomTargetingKey`. This field is read-only. A key can be activated and deactivated by calling [CustomTargetingService.performCustomTargetingKeyAction](/ad-manager/api/reference/v202411/CustomTargetingService#performCustomTargetingKeyAction). *** ** * ** *** **Enumerations** `ACTIVE` : The object is active. `INACTIVE` : The object is no longer active. `UNKNOWN` : The value returned if the actual value is not exposed by the requested API version. \u003cbr /\u003e |\n| `reportableType` | ` `[ReportableType](/ad-manager/api/reference/v202411/CustomTargetingService.ReportableType)` ` Reportable state of a {@CustomTargetingKey} as defined in [ReportableType](/ad-manager/api/reference/v202411/CustomTargetingService.ReportableType). *** ** * ** *** **Enumerations** `UNKNOWN` : The value returned if the actual value is not exposed by the requested API version. `ON` : Available for reporting in the Ad Manager query tool. `OFF` : Not available for reporting in the Ad Manager query tool. `CUSTOM_DIMENSION` : Custom dimension available for reporting in the AdManager query tool. \u003cbr /\u003e |"]]