Reference documentation and code samples for the Google Ads Ad Manager V1 Client class CustomTargetingKey.
TheCustomTargetingKeyresource.
Generated from protobuf messagegoogle.ads.admanager.v1.CustomTargetingKey
Namespace
Google \ Ads \ AdManager \ V1
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ name
string
Identifier. The resource name of theCustomTargetingKey. Format:networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}
↳ custom_targeting_key_id
int|string
Output only.CustomTargetingKeyID.
↳ ad_tag_name
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.
↳ display_name
string
Optional. Descriptive name for theCustomTargetingKey.
↳ type
int
Required. Indicates whether users will select from predefined values or create new targeting values, while specifying targeting criteria for a line item.
↳ status
int
Output only. Status of theCustomTargetingKey.
↳ reportable_type
int
Required. Reportable state of theCustomTargetingKey.
getName
Identifier. The resource name of theCustomTargetingKey.
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.
Returns
Type
Description
string
setAdTagName
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.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getDisplayName
Optional. Descriptive name for theCustomTargetingKey.
Returns
Type
Description
string
setDisplayName
Optional. Descriptive name for theCustomTargetingKey.
Parameter
Name
Description
var
string
Returns
Type
Description
$this
getType
Required. Indicates whether users will select from predefined values or
create new targeting values, while specifying targeting criteria for a line
item.
Returns
Type
Description
int
setType
Required. Indicates whether users will select from predefined values or
create new targeting values, while specifying targeting criteria for a line
item.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getStatus
Output only. Status of theCustomTargetingKey.
Returns
Type
Description
int
setStatus
Output only. Status of theCustomTargetingKey.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getReportableType
Required. Reportable state of theCustomTargetingKey.
Returns
Type
Description
int
setReportableType
Required. Reportable state of theCustomTargetingKey.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Ads Ad Manager V1 Client - Class CustomTargetingKey (0.3.1)\n\nVersion latestkeyboard_arrow_down\n\n- [0.3.1 (latest)](/php/docs/reference/ad-manager/latest/V1.CustomTargetingKey)\n- [0.3.0](/php/docs/reference/ad-manager/0.3.0/V1.CustomTargetingKey)\n- [0.2.0](/php/docs/reference/ad-manager/0.2.0/V1.CustomTargetingKey)\n- [0.1.3](/php/docs/reference/ad-manager/0.1.3/V1.CustomTargetingKey) \nReference documentation and code samples for the Google Ads Ad Manager V1 Client class CustomTargetingKey.\n\nThe `CustomTargetingKey` resource.\n\nGenerated from protobuf message `google.ads.admanager.v1.CustomTargetingKey`\n\nNamespace\n---------\n\nGoogle \\\\ Ads \\\\ AdManager \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getName\n\nIdentifier. The resource name of the `CustomTargetingKey`.\n\nFormat:\n`networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}`\n\n### setName\n\nIdentifier. The resource name of the `CustomTargetingKey`.\n\nFormat:\n`networks/{network_code}/customTargetingKeys/{custom_targeting_key_id}`\n\n### getCustomTargetingKeyId\n\nOutput only. `CustomTargetingKey` ID.\n\n### setCustomTargetingKeyId\n\nOutput only. `CustomTargetingKey` ID.\n\n### getAdTagName\n\nImmutable. Name of the key. Keys can contain up to 10 characters each. You\ncan use alphanumeric characters and symbols other than the following:\n\", ', =, !, +, #, \\*, \\~, ;, \\^, (, ), \\\u003c, \\\u003e, \\[, \\], the white space character.\n\n### setAdTagName\n\nImmutable. Name of the key. Keys can contain up to 10 characters each. You\ncan use alphanumeric characters and symbols other than the following:\n\", ', =, !, +, #, \\*, \\~, ;, \\^, (, ), \\\u003c, \\\u003e, \\[, \\], the white space character.\n\n### getDisplayName\n\nOptional. Descriptive name for the `CustomTargetingKey`.\n\n### setDisplayName\n\nOptional. Descriptive name for the `CustomTargetingKey`.\n\n### getType\n\nRequired. Indicates whether users will select from predefined values or\ncreate new targeting values, while specifying targeting criteria for a line\nitem.\n\n### setType\n\nRequired. Indicates whether users will select from predefined values or\ncreate new targeting values, while specifying targeting criteria for a line\nitem.\n\n### getStatus\n\nOutput only. Status of the `CustomTargetingKey`.\n\n### setStatus\n\nOutput only. Status of the `CustomTargetingKey`.\n\n### getReportableType\n\nRequired. Reportable state of the `CustomTargetingKey`.\n\n### setReportableType\n\nRequired. Reportable state of the `CustomTargetingKey`."]]